Snowflake

Snowflake Billing and Cost Management

2026-03-26
更新: 2026-03-27
NicheeLab Editorial Team

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.

Credit Billing Model

Billing CategoryScopeBilling UnitWhen You're Charged
Warehouse creditsVirtual Warehouse uptimeSize x uptime (per second, 60s minimum)While the warehouse is running
Cloud ServicesMetadata operations, authentication, optimizationAmount that exceeds 10% of compute creditsAlways (with a 10% free allowance)
Serverless CreditSnowpipe, Clustering, MV, Replication, etc.Service-specific credit rateWhen the service is used
StorageTables, stages, Time Travel, Fail-safeTB/month (compressed data volume)Measured daily, settled monthly
Data transferCross-region / cross-cloud data movementPer GBWhen transfer occurs

Warehouse Size and Credit Consumption

Warehouse SizeCredits per HourNode Count
X-Small11
Small22
Medium44
Large88
X-Large1616
2X-Large3232
3X-Large6464
4X-Large128128

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.

WAREHOUSE_METERING_HISTORY

-- 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;

METERING_HISTORY (All Services Combined)

-- 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 Task

Resource Monitor

Resource 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;

Resource Monitor Action Comparison

ActionBehaviorRecommended Use
NOTIFYNotifies admins only; the warehouse keeps runningFirst threshold (70-80%)
SUSPENDWaits for running queries to finish, then stops the warehouseMiddle threshold (90-95%)
SUSPEND_IMMEDIATECancels running queries immediately and stops the warehouseFinal threshold (100%)

5 Cost Optimization Tactics

1. Tune AUTO_SUSPEND

-- 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;

2. Separate Warehouses by Workload

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.

3. Reduce Scan Volume with Query Optimization

-- 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;

4. Cut Storage Cost

-- 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

5. Monitor and Control Serverless Credits

-- 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;

Chargeback Report

-- 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;

Check Yourself with a Question

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?

  1. Clustering Keys are set on the table → Remove the Clustering Keys
  2. AUTO_SUSPEND is disabled (set to 0) and the warehouse runs 24/7 → Set AUTO_SUSPEND to 60-300
  3. Cloud Services billing has exceeded the 10% free allowance → Increase the warehouse size
  4. Time Travel storage cost has surged → Set DATA_RETENTION_TIME_IN_DAYS to 0

正解: 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.

Frequently Asked Questions

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.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

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.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification — Associate, Core, Specialty, Ad...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams ranked by difficulty with study-time es...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — six domains, scope, sample ques...

Snowflake

SnowPro Associate Platform (SOL-C01): Complete Guide (2026)

The entry-level SnowPro Associate exam — scope, weighting, s...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.