Understanding Snowflake Credit and Storage Usage¶
Snowflake brings unprecedented flexibility and scalability to data warehousing. The goal of Snowflake pricing is to enable these capabilities at a low cost in the simplest possible way.
The Snowflake cloud architecture separates data warehousing into two distinct functions: compute resources (implemented as virtual warehouses) and data storage. The costs associated with using Snowflake are based on your usage of each of these functions.
In this Topic:
Virtual Warehouse Credit Usage¶
Virtual warehouses are used to execute queries, load data, and perform other DML operations. Snowflake credits are used to pay for the processing time used by each virtual warehouse.
What are Snowflake Credits?¶
All costs for compute resources in Snowflake are based on credits. When you signed up for Snowflake, you either purchased (or were granted) a quantity of credits or you chose to be billed for your monthly credit usage. Snowflake credits are charged based on the number of virtual warehouses you use, how long they run, and their size.
Warehouses come in seven sizes. The size specifies the number of servers per cluster in the warehouse. There is a one-to-one correspondence between the number of servers in a warehouse cluster and the number of credits billed for each full hour that the warehouse runs:
- Warehouses are only billed for credit usage when they are running. When a warehouse is suspended, it does not accrue any credit usage.
- The credit numbers shown here are for a full hour of usage; however, credits are billed per-second, with a 60-second (i.e. 1-minute) minimum:
- Each time a warehouse is started or resized to a larger size, the warehouse is billed for 1 minute’s worth of usage based on the hourly rate shown above.
- After 1 minute, all subsequent billing is per-second.
- Stopping and restarting a warehouse within the first minute does not change the amount billed; the minimum billing charge is 1 minute.
- When a warehouse is increased in size, credits are billed only for the additional servers that are provisioned. For example, changing from Small (2) to Medium (4) results in billing charges for 1 minute’s worth of 2 credits.
Viewing Credit Usage for Your Account¶
Users with the ACCOUNTADMIN role can use the Snowflake web interface or SQL to view monthly and daily credit usage for all the warehouses in your account.
To view warehouse credit usage for your account:
Data Storage Usage¶
Data storage is calculated monthly based on the average number of on-disk bytes for all data stored each day in your Snowflake account, including:
- Files stored in Snowflake locations (i.e. user and table stages or internal named stages) for bulk data loading/unloading. The user who stages a file can choose whether or not to compress the file to reduce storage.
- Data stored in database tables, including 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.
- Historical data maintained for Fail-safe.
The monthly costs for storing data in Snowflake is based on a flat rate per terabyte (TB). The amount charged per TB depends on your type of account (Capacity or On Demand) and region (US or EU). For data storage pricing, see the pricing page.
Viewing Data Usage for Your Account¶
Users with the ACCOUNTADMIN role can use the Snowflake web interface or SQL to view average monthly and daily data storage (in bytes) for your account.
To view data storage (for tables, stages, and Fail-safe) for your account:
Viewing Data Usage for a Table¶
Users with the appropriate access privileges can use either the web interface or SQL to view the size (in bytes) of individual tables in a schema/database:
Web Interface: Click on Databases ▶ db_name ▶ Tables SQL: SHOW TABLES
In addition, users with the ACCOUNTADMIN role can use SQL to view table size information:
The size displayed for a table represents the number of bytes that will be scanned if the entire table is scanned in a query; however, this number may be different from the number of physical bytes (i.e. bytes stored on-disk) for the table, specifically for cloned tables and tables with deleted data:
- A cloned table does not utilize additional storage (until rows are added to the table or existing rows in the table are modified or deleted). As a result, the table size displayed may be larger than the actual physical bytes stored for the table, i.e. the table contributes less to the overall data storage for the account than the size indicates.
- Data deleted from a table is not included in the displayed table size; however, the data is maintained in Snowflake until both the Time Travel retention period (default is 1 day) and the Fail-safe period (7 days) for the data has passed. During these two periods, the table size displayed is smaller than the actual physical bytes stored for the table, i.e. the table contributes more to the overall data storage for the account than the size indicates.
For more information about storage for cloned tables and deleted data, see Data Storage Considerations.