Warehouse Credit Consumption in Snowflake
Understanding how Snowflake charges for compute is essential for managing cost.
Snowflake Virtual Warehouses follow a straightforward billing model:
Storage is inexpensive and always-on.
Compute (warehouses) is where most credit consumption happens.
1. How Snowflake Charges for Warehouses
Snowflake consumes credits based on:
- Warehouse size
- Number of active clusters (if multi-cluster is enabled)
- How long the warehouse runs
- Auto-suspend and auto-resume settings
You pay only when the warehouse is running.
When it is suspended, no credits are charged.
2. Credit Rates per Warehouse Size
| Warehouse Size | Credits per Hour |
|---|---|
| X-Small | 1 |
| Small | 2 |
| Medium | 4 |
| Large | 8 |
| X-Large | 16 |
| 2XL | 32 |
| 3XL | 64 |
| 4XL | 128 |
Credits are billed per second, not per hour.
3. How Credit Calculation Works
Single-Cluster Warehouse
Credits Used = (Credits per hour / 3600) * seconds running
Multi-Cluster Warehouse
Credits = (Credits per hour * number of clusters / 3600) * seconds running
Warehouses automatically scale clusters up or down based on concurrency.
4. Credit Consumption Diagram
5. Examples
Example 1: Medium Warehouse
- Size: Medium (4 credits/hour)
- Running: 30 minutes
4 credits/hour ÷ 60 = 0.066 credits per minute
Total = 30 × 0.066 = 1.98 credits
Example 2: Large Multi-Cluster
- Warehouse Size: Large (8 credits/hour)
- Active Clusters: 3
- Running: 20 minutes
8 × 3 = 24 credits/hour
24 ÷ 60 = 0.4 credits per minute
Total = 20 × 0.4 = 8 credits
Example 3: Auto-Suspend Savings
- Size: Small (2 credits/hour)
- Running: 5 minutes
2 ÷ 60 = 0.033 credits per minute
Total = 5 × 0.033 = 0.166 credits
(No charge during suspension)
6. Auto-Suspend
Auto-suspend helps reduce cost by shutting down warehouses after inactivity.
Example:
AUTO_SUSPEND = 60
Warehouse stops 60 seconds after the last query, and credits stop being consumed.
7. Auto-Resume
When a query is submitted, the warehouse automatically resumes.
AUTO_RESUME = TRUE
Resume time is usually 2–5 seconds.
8. When Do Credits Stop?
Credits stop when:
- The warehouse is fully suspended
- All clusters in a multi-cluster warehouse are suspended
Credits continue when:
- Queries are running
- Warehouse is resuming
- Warehouse is resizing
- Additional clusters are active
9. Optimization Best Practices
- Always enable auto-suspend
- Enable auto-resume
- Right-size the warehouse (XS, S, M solve most cases)
- Use multi-cluster only for high concurrency
- Separate warehouses for ETL, BI, and data science workloads
- Avoid leaving warehouses running overnight
10. Summary
| Factor | Impact on Credits |
|---|---|
| Warehouse Size | Larger size = more credits |
| Active Clusters | Each cluster increases cost |
| Running Time | Billed per second |
| Auto-Suspend | Reduces cost significantly |
| Auto-Resume | Ensures seamless operation |
Snowflake’s credit model is simple: You pay only when compute is in use. Managing warehouse behavior is the key to controlling Snowflake costs.
You can see Snowflake cost (credit + storage usage) in two places:
✅ 1. In Snowflake UI
Go to:
Admin → Cost Management
Here you can see:
- Daily credit usage
- Warehouse-wise consumption
- Query cost
- Storage cost
- Cloud services cost
- Cost by user / role
- Cost by warehouse
- Cost by database
Admin → Usage
You will find:
- Query History (with credit used)
- Warehouse Load & Usage
- Stage usage
- Storage usage over time
✅ 2. In Snowflake ACCOUNT_USAGE Views (SQL)
Snowflake provides multiple system tables under:
SNOWFLAKE.ACCOUNT_USAGE
Below are the main cost-related tables:
📌 1. WAREHOUSE_METERING_HISTORY
Shows credits consumed by warehouses.
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
ORDER BY START_TIME DESC;
Columns:
WAREHOUSE_NAMECREDITS_USEDSTART_TIMEEND_TIME
📌 2. METERING_HISTORY (All compute usage)
Shows total compute credits including cloud services.
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
ORDER BY START_TIME DESC;
📌 3. QUERY_HISTORY
Shows credit cost per query.
SELECT QUERY_TEXT,
TOTAL_ELAPSED_TIME,
CREDITS_USED_CLOUD_SERVICES,
CREDITS_USED
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
ORDER BY START_TIME DESC;
📌 4. STORAGE_USAGE
Shows storage used daily.
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.STORAGE_USAGE
ORDER BY USAGE_DATE DESC;
📌 5. LOGIN_HISTORY / ACCESS_HISTORY
Not credit-related, but useful for understanding user activity which affects cost.
⭐ Recommended Dashboard Query
SELECT
WAREHOUSE_NAME,
SUM(CREDITS_USED) AS TOTAL_CREDITS,
SUM(CREDITS_USED_CLOUD_SERVICES) AS CLOUD_SERVICES_CREDITS,
MIN(START_TIME) AS FROM_DATE,
MAX(END_TIME) AS TO_DATE
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
GROUP BY 1
ORDER BY TOTAL_CREDITS DESC;
🎯 Summary
| Cost Type | Where in UI | SQL Table |
|---|---|---|
| Warehouse credits | Admin → Cost Management → Warehouses | WAREHOUSE_METERING_HISTORY |
| Compute credits | Admin → Usage → Compute | METERING_HISTORY |
| Query cost | Query History | QUERY_HISTORY |
| Storage cost | Admin → Cost Management → Storage | STORAGE_USAGE |
| Cloud services cost | Cost Management | METERING_HISTORY |