Snowflake billing has two axes: compute (credits) and storage (TB/month). Compute consumes credits based on warehouse uptime and serverless service usage, while storage is billed against the combined volume of active data, Time Travel, and Fail-safe. This article walks through the structure of the credit billing model, the SQL you need for monitoring, Resource Monitor configuration, and 5 cost-optimization tactics you can apply in production right away.
| Billing Category | Scope | Billing Unit | When You're Charged |
|---|---|---|---|
| Warehouse credits | Virtual Warehouse uptime | Size x uptime (per second, 60s minimum) | While the warehouse is running |
| Cloud Services | Metadata operations, authentication, optimization | Amount that exceeds 10% of compute credits | Always (with a 10% free allowance) |
| Serverless Credit | Snowpipe, Clustering, MV, Replication, etc. | Service-specific credit rate | When the service is used |
| Storage | Tables, stages, Time Travel, Fail-safe | TB/month (compressed data volume) | Measured daily, settled monthly |
| Data transfer | Cross-region / cross-cloud data movement | Per GB | When transfer occurs |
| Warehouse Size | Credits per Hour | Node Count |
|---|---|---|
| X-Small | 1 | 1 |
| Small | 2 | 2 |
| Medium | 4 | 4 |
| Large | 8 | 8 |
| X-Large | 16 | 16 |
| 2X-Large | 32 | 32 |
| 3X-Large | 64 | 64 |
| 4X-Large | 128 | 128 |
For Multi-cluster Warehouses, you multiply the credits above by the number of running clusters. For example, a Medium warehouse with 3 active clusters consumes 4 x 3 = 12 credits/hour.
-- Daily credit consumption per warehouse
SELECT
start_time::DATE AS usage_date,
warehouse_name,
SUM(credits_used) AS total_credits,
SUM(credits_used_compute) AS compute_credits,
SUM(credits_used_cloud_services) AS cloud_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY total_credits DESC;
-- Hour-of-day credit consumption pattern
SELECT
EXTRACT(HOUR FROM start_time) AS hour_of_day,
warehouse_name,
AVG(credits_used) AS avg_hourly_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(DAY, -30, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY warehouse_name, hour_of_day;-- Credit consumption across all services
SELECT
start_time::DATE AS usage_date,
service_type,
SUM(credits_used) AS total_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE start_time >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY usage_date, total_credits DESC;
-- service_type values:
-- WAREHOUSE_METERING : Warehouse
-- AUTO_CLUSTERING : Automatic Clustering
-- MATERIALIZED_VIEW : MV maintenance
-- PIPE : Snowpipe
-- REPLICATION : Replication
-- SEARCH_OPTIMIZATION : Search Optimization Service
-- SERVERLESS_TASK : Serverless TaskResource Monitor is the governance feature that caps warehouse credit consumption and triggers notifications or suspension when thresholds are hit. You create and manage them as ACCOUNTADMIN.
-- Create a Resource Monitor
CREATE RESOURCE MONITOR bi_monitor
WITH CREDIT_QUOTA = 500
FREQUENCY = MONTHLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 80 PERCENT DO NOTIFY
ON 95 PERCENT DO SUSPEND
ON 100 PERCENT DO SUSPEND_IMMEDIATE;
-- Assign the Resource Monitor to a warehouse
ALTER WAREHOUSE bi_dashboard_wh SET RESOURCE_MONITOR = bi_monitor;
-- Account-level Resource Monitor (applies to every warehouse)
ALTER ACCOUNT SET RESOURCE_MONITOR = account_monitor;
-- Inspect Resource Monitors
SHOW RESOURCE MONITORS;| Action | Behavior | Recommended Use |
|---|---|---|
| NOTIFY | Notifies admins only; the warehouse keeps running | First threshold (70-80%) |
| SUSPEND | Waits for running queries to finish, then stops the warehouse | Middle threshold (90-95%) |
| SUSPEND_IMMEDIATE | Cancels running queries immediately and stops the warehouse | Final threshold (100%) |
-- Interactive: auto-suspend after 5 minutes (300 seconds)
ALTER WAREHOUSE bi_wh SET AUTO_SUSPEND = 300;
-- Batch: auto-suspend after 1 minute (60 seconds)
ALTER WAREHOUSE etl_wh SET AUTO_SUSPEND = 60;
-- Enable AUTO_RESUME so the warehouse wakes up on query arrival
ALTER WAREHOUSE bi_wh SET AUTO_RESUME = TRUE;Running BI, ETL, and data science workloads on a single warehouse causes resource contention, slows every query, and ultimately drives up cost. Create a dedicated warehouse per workload and tune size and AUTO_SUSPEND individually for each.
-- Find queries with poor partition pruning
SELECT
query_id,
query_text,
partitions_scanned,
partitions_total,
ROUND(partitions_scanned / NULLIF(partitions_total, 0) * 100, 1) AS scan_pct,
bytes_scanned / POWER(1024, 3) AS gb_scanned
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE start_time >= DATEADD(DAY, -7, CURRENT_TIMESTAMP())
AND partitions_total > 100
AND partitions_scanned / NULLIF(partitions_total, 0) > 0.8
ORDER BY bytes_scanned DESC
LIMIT 20;-- Inspect Time Travel and Fail-safe storage usage
SELECT
table_catalog AS database_name,
table_schema AS schema_name,
table_name,
ROUND(active_bytes / POWER(1024, 3), 2) AS active_gb,
ROUND(time_travel_bytes / POWER(1024, 3), 2) AS time_travel_gb,
ROUND(failsafe_bytes / POWER(1024, 3), 2) AS failsafe_gb,
ROUND(retained_for_clone_bytes / POWER(1024, 3), 2) AS clone_gb
FROM SNOWFLAKE.ACCOUNT_USAGE.TABLE_STORAGE_METRICS
WHERE active_bytes > 0
ORDER BY (active_bytes + time_travel_bytes + failsafe_bytes) DESC
LIMIT 30;
-- Detect unnecessary Transient candidates (intermediate data that doesn't need Fail-safe)
-- Switching to Transient tables cuts Fail-safe storage cost-- Serverless credit trend by service
SELECT
start_time::DATE AS usage_date,
service_type,
SUM(credits_used) AS credits
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE start_time >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
AND service_type != 'WAREHOUSE_METERING'
GROUP BY 1, 2
ORDER BY usage_date, credits DESC;-- Monthly cost report per warehouse (for chargeback)
SELECT
warehouse_name,
DATE_TRUNC('MONTH', start_time) AS billing_month,
SUM(credits_used) AS total_credits,
SUM(credits_used) * 3.00 AS estimated_cost_usd -- unit price depends on contract
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(MONTH, -3, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY billing_month DESC, total_credits DESC;Cost Management
問題 1
A data team uses a Medium warehouse for a monthly batch ETL, but the ETL job only runs for 30 minutes once a day. Despite that, monthly credit consumption is 5x higher than expected. Which root cause and remediation combination is most likely correct?
正解: B
A Medium warehouse (4 credits/hour) running 24 hours x 30 days would consume 4 x 24 x 30 = 2,880 credits, but a 30-minute daily ETL should only cost 4 x 0.5 x 30 = 60 credits. The 5x gap most likely means AUTO_SUSPEND is disabled and the warehouse is running around the clock. Setting AUTO_SUSPEND to 60-300 seconds lets the warehouse auto-stop while idle and dramatically cuts cost.
What is a Snowflake credit, and how do I translate it into actual dollars?
A credit is Snowflake's unit for measuring compute consumption. The dollar value of a credit depends on the combination of Edition, cloud provider, and region, and it also varies between On-Demand and Capacity contracts. For example, on AWS US-EAST-1 with Enterprise Edition, one credit is roughly $3 (On-Demand). You can compute actual cost by pulling credit usage from WAREHOUSE_METERING_HISTORY and multiplying by your contracted unit price. The ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY view lets you check daily consumption directly in dollars.
How does the Resource Monitor 'Suspend Immediately' action behave?
The SUSPEND_IMMEDIATE action cancels running queries and stops the warehouse the moment credit usage hits the threshold. The SUSPEND action waits for currently running queries to finish before stopping the warehouse. Use SUSPEND_IMMEDIATE when you must hard-cap cost, but because it interrupts user queries, SUSPEND is usually recommended for production BI warehouses. The NOTIFY action only sends an alert to admins and does not stop the warehouse, so a multi-tier setup like NOTIFY at the first threshold (e.g., 80%) and SUSPEND at the final threshold (100%) is the common pattern.
How are Serverless Credits different from warehouse credits?
Warehouse credits are billed against the uptime of Virtual Warehouses that you explicitly create. Serverless Credits are billed against background services that Snowflake manages automatically, such as Automatic Clustering, Materialized View Maintenance, Snowpipe, Replication, and Search Optimization Service. The unit price for Serverless Credits differs from warehouse credits and is typically a bit higher. You can track per-service Serverless Credit consumption through views like SERVERLESS_TASK_HISTORY and AUTOMATIC_CLUSTERING_HISTORY.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Snowflake Certifications: All 11 Exams Explained (2026)
Every SnowPro certification — Associate, Core, Specialty, Ad...
Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)
All 11 SnowPro exams ranked by difficulty with study-time es...
Snowflake Study Guide: Fastest Pass Route by Exam (2026)
How to pass SnowPro certifications efficiently — official ma...
SnowPro Core (COF-C03): Complete Exam Guide (2026)
Pass the SnowPro Core exam — six domains, scope, sample ques...
SnowPro Associate Platform (SOL-C01): Complete Guide (2026)
The entry-level SnowPro Associate exam — scope, weighting, s...