了解存储成本
存储成本代表以下成本:
- Files staged for bulk data loading/unloading (stored compressed or uncompressed).
- Database tables, including historical data for Time Travel.
- Fail-safe for database tables.
- Clones of database tables that reference data deleted in the table that owns the clones.
The monthly costs for storing data in Snowflake are based on a flat rate per terabyte (TB). The amount charged depends on your type of account (Capacity or On Demand) and region (US or EU).
For storage pricing, see the Snowflake Pricing Guide.
暂存文件成本
Files staged for bulk data loading/unloading incur storage costs based on the size of the files. For more information on loading data, see Load data into Snowflake.
数据库成本
Database costs include data stored in database tables. Database costs also include historical data maintained for Time Travel. Snowflake automatically compresses all data stored in tables and uses the compressed file size to calculate the total storage used for an account.
See also Data storage considerations.
Time Travel 和故障安全成本¶
Time Travel 和故障安全费用从数据更改之日起每 24 小时(即 1 天)计算一次。历史数据的维护天数取决于表类型和表的 Time Travel 保留期。
Snowflake 仅维护恢复已更新或删除的各个表行所需的信息,从而最大限度地减少历史数据所需的存储量。因此,存储使用量按已更改表的百分比计算。仅当删除或截断表时才会维护表的完整副本。
临时表和瞬态表成本
为帮助管理与 Time Travel 和故障安全相关的存储成本,Snowflake 提供了两种表类型:临时表和瞬态表。临时表和瞬态表不会产生与永久表相同的费用:
- Transient and temporary tables contribute to the storage charges that Snowflake bills your account until explicitly dropped. Data stored in these table types contributes to the overall storage charges Snowflake bills your account while they exist.
- Temporary tables are typically used for non-permanent session specific transitory data such as ETL or other session specific data. Temporary tables only exist for the lifetime or their associated session. On session end, temporary table data is purged and unrecoverable. Temporary tables are not accessible outside the specific session which created them.
- 临时表一直存在,直到显式删除为止,并且所有具有适当权限的用户都可以使用临时表。
- 瞬态表和临时表的 Time Travel 保留期可以为 0 天或 1 天。
- 瞬态表和临时表没有故障安全期。
- 瞬态表和临时表最多会产生一天的存储成本。
下表根据表类型说明了不同的场景:
| Table Type | Time Travel Retention Period (Days) | Fail-safe Period (Days) | Min, Max Historical Data Maintained (Days) |
|---|---|---|---|
| Permanent | 0 or 1 (for Snowflake Standard Edition) | 7 | 7 , 8 |
| 0 to 90 (for Snowflake Enterprise Edition) | 7 | 7 , 97 | |
| Transient | 0 or 1 | 0 | 0 , 1 |
| Temporary | 0 or 1 | 0 | 0 , 1 |
使用临时表和瞬态表来管理存储成本
选择是否将数据存储在永久表、临时表或瞬态表中时,请考虑以下事项:
- Temporary tables are dropped when the session in which they were created ends. Data stored in temporary tables is not recoverable after the table is dropped.
- Historical data in transient tables cannot be recovered by Snowflake after the Time Travel retention period ends. Use transient tables only for data you can replicate or reproduce independently from Snowflake.
- Long-lived tables, such as fact tables, should always be defined as permanent to ensure they are fully protected by Fail-safe.
- Short-lived tables (i.e. <1 day), such as ETL work tables, can be defined as transient to eliminate Fail-safe costs.
- If downtime and the time required to reload lost data are factors, permanent tables, even with their added Fail-safe costs, may offer a better overall solution than transient tables.
Note
表的默认类型为永久表。要将表定义为临时表或瞬态表,必须在创建表时显式指定类型。
混合表存储成本
Cost for storage of hybrid tables depends on the amount of data that you are storing. Storage cost is based on a flat monthly rate per gigabyte (GB). See Table 3(b) in the Snowflake Service Consumption Table, which covers unit pricing for hybrid table storage.
请注意,用于数据的行存储副本 的混合表存储比传统的 Snowflake 存储更昂贵。列存储(对象存储)中当前数据的副本不计费。
历史 Time Travel 数据按标准存储价格计费。
For more information, see Evaluate cost for hybrid tables.
克隆表、架构和数据库成本
Snowflake 的 Zero-Copy Cloning 功能提供了一种便捷的方法来快速获取任何表(混合表除外)、架构或数据库的“快照”,并创建最初共享底层存储的该对象的派生副本。这对于创建不会产生任何额外成本的即时备份非常有用(直到对克隆对象进行更改)。
然而,克隆使得计算总存储使用量变得更加复杂,因为每个克隆都有自己单独的生命周期。这表示可以彼此独立地对原始对象或克隆进行更改,并且这些更改通过 CDP 受到保护。
例如,当创建表的克隆时,该克隆不使用任何存储,因为它在克隆时共享原始表的所有现有微分区;但是,可以在克隆中独立于原始表添加、删除或更新行。对克隆的每次更改都会产生新的微分区,这些分区由克隆独占并通过 CDP 进行保护。
此外,克隆可以被克隆,对可以创建的克隆的数量或迭代没有限制(例如,您可以创建克隆的克隆的克隆,等等),这会产生 n 级层次结构克隆对象,每个对象都有自己的共享和独立存储部分。
Cross-Cloud Auto-Fulfillment 成本¶
Cross-Cloud Auto-Fulfillment lets you provide a data product to consumers in other cloud regions without manual data replication. When your data product is auto-fulfilled to another region, you incur storage and other costs. For details, see Auto-fulfillment costs.
存储请求费用
When an external query engine accesses an Apache Iceberg™ table that uses Snowflake Storage through the Snowflake Horizon Catalog, Snowflake charges a per-request fee for each HTTP request sent to the underlying storage system. The rate depends on the request type:
- PUT、COPY、POST、PATCH 和 LIST 操作按“类别 1”请求计费。
- GET 和 SELECT 操作按“类别 2”请求计费。
Snowflake only bills for table accesses through the Horizon Catalog. Direct access using the Snowflake query engine isn’t charged. Non-Iceberg accesses, such as FDN and stage accesses, don’t incur storage request fees. For more information, see Request cost.
后续主题