Snowflake Cost Check
Run read-only queries in Snowsight and see idle credits, oversized warehouses, auto-suspend waste and storage overhead.
Before you start: what to have readyShow
- A role that can read Account Usage. ACCOUNTADMIN, or a role granted IMPORTED PRIVILEGES on the SNOWFLAKE database.
- A small warehouse to run them on. Two of the queries read 30 days of query history. An X-Small is enough.
- Thirty complete days. The queries read the last 30 complete UTC days. Account Usage lags by up to 8 hours, so run them after 08:00 UTC for a complete last day.
See the report before you run anything. The sample is made-up results in the same columns as the real queries.
US East (N. Virginia), Enterprise: $3 a credit and $23 per TB a month on demand, in USD, from Snowflake’s consumption table read on 2026-11-13. A capacity contract is usually cheaper: type your own price and every figure follows.
0 of 4 results added. You can run the check with fewer, and the report marks what is missing. Run the queries as ACCOUNTADMIN, or a role with IMPORTED PRIVILEGES on the SNOWFLAKE database.
1. The account bill
Credits by service for the last 30 complete UTC days (warehouses, automatic clustering, Cortex, tasks and the rest), the cloud services allowance, and average storage. Totals only. It also returns the account’s region, so the prices follow it.
-- Finitizer Snowflake Cost Check, query 1 of 5: the account bill
-- sf-cost-check-v1 (2026-11-10). Read-only: it reads Account Usage and changes nothing.
-- Credits by service for the last 30 complete UTC days, and average storage. Totals only.
-- Needs ACCOUNTADMIN, or a role with IMPORTED PRIVILEGES on the SNOWFLAKE database.
WITH w AS (
SELECT DATEADD(day, -30, DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP()))) AS ws,
DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP())) AS we
),
s AS (
SELECT COUNT(*) AS days,
AVG(storage_bytes) AS database_bytes,
AVG(stage_bytes) AS stage_bytes,
AVG(failsafe_bytes) AS failsafe_bytes,
AVG(hybrid_table_storage_bytes) AS hybrid_bytes
FROM snowflake.account_usage.storage_usage, w
WHERE usage_date >= w.ws::DATE AND usage_date < w.we::DATE
)
SELECT 'credits' AS row_kind,
m.service_type AS item,
SUM(m.credits_used_compute)::FLOAT AS credits_compute,
SUM(m.credits_used_cloud_services)::FLOAT AS credits_cloud_services,
SUM(m.credits_adjustment_cloud_services)::FLOAT AS credits_adjustment,
SUM(m.credits_billed)::FLOAT AS credits_billed,
COUNT(DISTINCT m.usage_date) AS days,
NULL::FLOAT AS average_bytes,
TO_VARCHAR(MIN(w.ws), 'YYYY-MM-DD') AS window_start,
TO_VARCHAR(MIN(w.we), 'YYYY-MM-DD') AS window_end,
CURRENT_REGION() AS region
FROM snowflake.account_usage.metering_daily_history m, w
WHERE m.usage_date >= w.ws::DATE AND m.usage_date < w.we::DATE
GROUP BY m.service_type
UNION ALL
SELECT 'storage', 'database', NULL, NULL, NULL, NULL, s.days, s.database_bytes::FLOAT,
TO_VARCHAR(w.ws, 'YYYY-MM-DD'), TO_VARCHAR(w.we, 'YYYY-MM-DD'), CURRENT_REGION()
FROM s, w
UNION ALL
SELECT 'storage', 'stage', NULL, NULL, NULL, NULL, s.days, s.stage_bytes::FLOAT,
TO_VARCHAR(w.ws, 'YYYY-MM-DD'), TO_VARCHAR(w.we, 'YYYY-MM-DD'), CURRENT_REGION()
FROM s, w
UNION ALL
SELECT 'storage', 'failsafe', NULL, NULL, NULL, NULL, s.days, s.failsafe_bytes::FLOAT,
TO_VARCHAR(w.ws, 'YYYY-MM-DD'), TO_VARCHAR(w.we, 'YYYY-MM-DD'), CURRENT_REGION()
FROM s, w
UNION ALL
SELECT 'storage', 'hybrid', NULL, NULL, NULL, NULL, s.days, s.hybrid_bytes::FLOAT,
TO_VARCHAR(w.ws, 'YYYY-MM-DD'), TO_VARCHAR(w.we, 'YYYY-MM-DD'), CURRENT_REGION()
FROM s, w
ORDER BY row_kind, credits_billed DESC NULLS LAST;2. Warehouse activity
Per warehouse: metered credits, the time queries kept it busy, and the idle time and resumes it would have at eight auto-suspend settings, from 60 seconds to three hours. Warehouse names and totals, never query text. It reads 30 days of query history, so run it on a small warehouse.
-- Finitizer Snowflake Cost Check, query 2 of 5: warehouse activity
-- sf-cost-check-v1 (2026-11-10). Read-only: it reads Account Usage and changes nothing.
-- Per warehouse: metered credits, the time queries kept it busy, and the idle time and
-- resumes it would have at each auto-suspend setting. Names and totals, no query text.
-- It reads 30 days of query history, so run it on a small warehouse. Allow a minute or two.
WITH w AS (
SELECT DATEADD(day, -30, DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP()))) AS ws,
DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP())) AS we
),
q AS (
SELECT h.warehouse_name, h.warehouse_size, h.start_time, h.end_time, h.execution_time,
h.execution_status, h.queued_overload_time,
h.bytes_spilled_to_local_storage, h.bytes_spilled_to_remote_storage
FROM snowflake.account_usage.query_history h, w
WHERE h.start_time >= w.ws AND h.start_time < w.we
AND h.warehouse_name IS NOT NULL
AND h.warehouse_size IS NOT NULL
AND h.end_time IS NOT NULL
),
o AS (
SELECT q.*,
MAX(end_time) OVER (PARTITION BY warehouse_name ORDER BY start_time, end_time
ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) AS prev_end
FROM q
),
g AS (
SELECT o.*,
GREATEST(0, DATEDIFF(millisecond, IFF(prev_end > start_time, prev_end, start_time), end_time)) / 1000 AS busy_s,
IFF(prev_end < start_time, DATEDIFF(millisecond, prev_end, start_time) / 1000, NULL) AS gap_s
FROM o
),
a AS (
SELECT warehouse_name,
MODE(warehouse_size) AS size_seen,
COUNT(*) AS queries,
COUNT_IF(UPPER(execution_status) <> 'SUCCESS') AS failed_queries,
SUM(busy_s) AS busy_seconds,
COUNT(gap_s) AS gaps,
SUM(gap_s) AS gap_seconds,
SUM(LEAST(gap_s, 75)) AS idle_60,
COUNT_IF(gap_s > 75) AS resumes_60,
SUM(LEAST(gap_s, 135)) AS idle_120,
COUNT_IF(gap_s > 135) AS resumes_120,
SUM(LEAST(gap_s, 315)) AS idle_300,
COUNT_IF(gap_s > 315) AS resumes_300,
SUM(LEAST(gap_s, 615)) AS idle_600,
COUNT_IF(gap_s > 615) AS resumes_600,
SUM(LEAST(gap_s, 915)) AS idle_900,
COUNT_IF(gap_s > 915) AS resumes_900,
SUM(LEAST(gap_s, 1815)) AS idle_1800,
COUNT_IF(gap_s > 1815) AS resumes_1800,
SUM(LEAST(gap_s, 3615)) AS idle_3600,
COUNT_IF(gap_s > 3615) AS resumes_3600,
SUM(LEAST(gap_s, 10815)) AS idle_10800,
COUNT_IF(gap_s > 10815) AS resumes_10800,
APPROX_PERCENTILE(execution_time, 0.95) / 1000 AS p95_execution_seconds,
SUM(bytes_spilled_to_local_storage) AS spill_local_bytes,
SUM(bytes_spilled_to_remote_storage) AS spill_remote_bytes,
SUM(queued_overload_time) / 1000 AS queued_overload_seconds,
COUNT_IF(queued_overload_time > 0) AS queued_queries
FROM g
GROUP BY warehouse_name
),
m AS (
SELECT warehouse_name,
SUM(credits_used_compute) AS credits_compute,
SUM(credits_used_cloud_services) AS credits_cloud_services,
SUM(credits_attributed_compute_queries) AS credits_attributed
FROM snowflake.account_usage.warehouse_metering_history, w
WHERE start_time >= w.ws AND start_time < w.we
GROUP BY warehouse_name
)
SELECT COALESCE(m.warehouse_name, a.warehouse_name) AS warehouse_name,
m.credits_compute, m.credits_cloud_services, m.credits_attributed,
a.size_seen, a.queries, a.failed_queries, a.busy_seconds, a.gaps, a.gap_seconds,
a.idle_60, a.resumes_60,
a.idle_120, a.resumes_120,
a.idle_300, a.resumes_300,
a.idle_600, a.resumes_600,
a.idle_900, a.resumes_900,
a.idle_1800, a.resumes_1800,
a.idle_3600, a.resumes_3600,
a.idle_10800, a.resumes_10800,
a.p95_execution_seconds, a.spill_local_bytes, a.spill_remote_bytes,
a.queued_overload_seconds, a.queued_queries,
TO_VARCHAR(w.ws, 'YYYY-MM-DD') AS window_start,
TO_VARCHAR(w.we, 'YYYY-MM-DD') AS window_end
FROM m
FULL OUTER JOIN a ON a.warehouse_name = m.warehouse_name
CROSS JOIN w
ORDER BY m.credits_compute DESC NULLS LAST;3. Warehouse settings
SHOW WAREHOUSES: each warehouse’s size, type, auto-suspend and cluster counts. The check needs it to model a shorter auto-suspend or a smaller size.
-- Finitizer Snowflake Cost Check, query 3 of 5: warehouse settings -- sf-cost-check-v1 (2026-11-10). Read-only: it reads Account Usage and changes nothing. -- Size, type, generation, auto-suspend and cluster counts for every warehouse your role can see. -- Run it as the same role as query 2 (ACCOUNTADMIN sees every warehouse). SHOW WAREHOUSES;
4. Storage by database
Active, Time Travel, Fail-safe and clone-retained bytes per database, and how many permanent tables hold more history than live data. Database names, no table names.
-- Finitizer Snowflake Cost Check, query 4 of 5: storage by database
-- sf-cost-check-v1 (2026-11-10). Read-only: it reads Account Usage and changes nothing.
-- Active, Time Travel, Fail-safe and clone-retained bytes per database, and how many
-- permanent tables hold more history than live data (the transient-table candidates).
-- Database names and totals only, no table names.
SELECT table_catalog AS database_name,
COUNT(*) AS tables,
SUM(active_bytes) AS active_bytes,
SUM(time_travel_bytes) AS time_travel_bytes,
SUM(failsafe_bytes) AS failsafe_bytes,
SUM(retained_for_clone_bytes) AS retained_for_clone_bytes,
COUNT_IF(is_transient = 'YES') AS transient_tables,
COUNT_IF(is_transient = 'NO' AND NOT COALESCE(deleted, FALSE)
AND time_travel_bytes + failsafe_bytes > active_bytes
AND time_travel_bytes + failsafe_bytes > 1073741824) AS churn_tables,
SUM(IFF(is_transient = 'NO' AND NOT COALESCE(deleted, FALSE)
AND time_travel_bytes + failsafe_bytes > active_bytes
AND time_travel_bytes + failsafe_bytes > 1073741824, time_travel_bytes, 0)) AS churn_time_travel_bytes,
SUM(IFF(is_transient = 'NO' AND NOT COALESCE(deleted, FALSE)
AND time_travel_bytes + failsafe_bytes > active_bytes
AND time_travel_bytes + failsafe_bytes > 1073741824, failsafe_bytes, 0)) AS churn_failsafe_bytes,
COUNT_IF(COALESCE(deleted, FALSE)) AS dropped_tables,
SUM(IFF(COALESCE(deleted, FALSE), time_travel_bytes + failsafe_bytes, 0)) AS dropped_bytes
FROM snowflake.account_usage.table_storage_metrics
GROUP BY table_catalog
ORDER BY SUM(active_bytes + time_travel_bytes + failsafe_bytes + retained_for_clone_bytes) DESC;Want to know which queries to look at first? Add optional query 5.
5. Query shapes (optional)
The 50 query shapes with the most compute credits, grouped by Snowflake’s parameterized hash: runs, failures, partitions scanned and spill. A hash and counts, never the query text. Add it to see which queries to look at first.
-- Finitizer Snowflake Cost Check, query 5 of 5: query shapes (optional)
-- sf-cost-check-v1 (2026-11-10). Read-only: it reads Account Usage and changes nothing.
-- The 50 query shapes with the most compute credits, grouped by Snowflake’s parameterized
-- hash (the query with its literals removed), plus totals. A hash and counts, never query text.
-- QUERY_ATTRIBUTION_HISTORY leaves out queries of about 100 ms or less and idle time.
WITH w AS (
SELECT DATEADD(day, -30, DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP()))) AS ws,
DATE_TRUNC('day', CONVERT_TIMEZONE('UTC', CURRENT_TIMESTAMP())) AS we
),
a AS (
SELECT query_id, query_parameterized_hash, warehouse_name,
credits_attributed_compute, COALESCE(credits_used_query_acceleration, 0) AS qas_credits
FROM snowflake.account_usage.query_attribution_history, w
WHERE start_time >= w.ws AND start_time < w.we
),
q AS (
SELECT h.query_id, h.execution_status, h.execution_time, h.bytes_scanned,
h.partitions_scanned, h.partitions_total, h.bytes_spilled_to_local_storage,
h.bytes_spilled_to_remote_storage, h.queued_overload_time, h.user_name, h.query_type
FROM snowflake.account_usage.query_history h, w
WHERE h.start_time >= w.ws AND h.start_time < w.we AND h.warehouse_size IS NOT NULL
),
s AS (
SELECT a.query_parameterized_hash AS shape,
MODE(a.warehouse_name) AS main_warehouse,
COUNT(DISTINCT a.warehouse_name) AS warehouses,
COUNT(*) AS runs,
SUM(a.credits_attributed_compute) AS credits,
SUM(a.qas_credits) AS qas_credits,
COUNT_IF(UPPER(q.execution_status) <> 'SUCCESS') AS failed_runs,
SUM(IFF(UPPER(q.execution_status) <> 'SUCCESS', a.credits_attributed_compute, 0)) AS failed_credits,
SUM(q.execution_time) / 1000 AS execution_seconds,
SUM(q.bytes_scanned) AS bytes_scanned,
SUM(q.partitions_scanned) AS partitions_scanned,
SUM(q.partitions_total) AS partitions_total,
SUM(q.bytes_spilled_to_local_storage) AS spill_local_bytes,
SUM(q.bytes_spilled_to_remote_storage) AS spill_remote_bytes,
SUM(q.queued_overload_time) / 1000 AS queued_seconds,
COUNT(DISTINCT q.user_name) AS users,
MODE(q.query_type) AS query_type
FROM a JOIN q ON q.query_id = a.query_id
WHERE a.query_parameterized_hash IS NOT NULL
GROUP BY a.query_parameterized_hash
),
t AS (
SELECT COUNT(DISTINCT query_parameterized_hash) AS shapes_total,
SUM(credits_attributed_compute) AS credits_total,
COUNT(*) AS runs_total
FROM a
)
SELECT s.*, t.shapes_total, t.credits_total, t.runs_total,
TO_VARCHAR(w.ws, 'YYYY-MM-DD') AS window_start,
TO_VARCHAR(w.we, 'YYYY-MM-DD') AS window_end
FROM s CROSS JOIN t CROSS JOIN w
ORDER BY s.credits DESC
LIMIT 50;Prices verified 13 Nov 2026. Public list prices in USD for 48 regions, before any discount you have negotiated.
Want this done on your real bill?
Cloud Cost Audit: We go through your real AWS or Google Cloud bill and hand you a ranked list of what to cut first. From $1,500, fixed. Nothing paid upfront.
About this check
Snowflake bills a warehouse for every second it is awake, and it stays awake for the whole auto-suspend period after the last query. So much of a Snowflake bill is time with nothing running. This check measures that from your own Account Usage views, prices it for your region and edition, and models the three changes the results can support: a shorter auto-suspend, one size smaller, and transient tables for data you can rebuild.
What it cannot model, it says so. Cloud services, background services, query shapes and clones show where the money goes, not whether the work can be avoided, so they are leads with today’s cost beside them, never a promised saving.
For scripts and AI agents
The API runs the same engine as this page, with no key or account, at up to 20 reports a minute. Send each result as text or base64, and any missing result is reported as not provided. The region comes from query 1 unless you send one. What you send is reported on in memory and not kept. Add format=markdown for text.
curl -s https://tools.finitizer.com/snowflake-cost-check/api \
-H 'content-type: application/json' \
-d "{\"edition\":\"enterprise\",\"results\":{\"bill\":{\"base64\":\"$(base64 -w0 query-1.csv)\"},\"warehouses\":{\"base64\":\"$(base64 -w0 query-2.csv)\"}}}"- data.json: the method, the queries, every column, the prices, the sample results and a worked report.
- openapi.json: the API description.
Questions
Does the Cost Check need access to my Snowflake account?
No. You run read-only Account Usage queries in Snowsight and load the results here. The report is computed in your browser. If you ask for the result by email, the headline figures go only if you tick the box, and never warehouse or database names.
Which role do the queries need?
ACCOUNTADMIN, or a role granted IMPORTED PRIVILEGES on the SNOWFLAKE database, which is where Account Usage lives. SHOW WAREHOUSES lists only the warehouses your role can see, so run query 3 as the same role as query 2.
What do the queries cost to run?
They run on your warehouse like any query. Queries 2 and 5 read 30 days of query history, so they take the longest on a busy account. Run them on an X-Small or Small warehouse, which bills 1 or 2 credits an hour while it runs (1.35 or 2.7 for Gen2 on AWS). SHOW WAREHOUSES needs no running warehouse.
How does it work out idle time?
Two ways that check each other. Snowflake meters each warehouse and attributes compute credits to the queries that ran, so compute minus attributed is time awake with nothing running. Query 2 also merges each warehouse’s queries into busy stretches and measures every gap between them. At a setting of T seconds a gap costs the smaller of the gap and T plus about 15 seconds, so the same month can be priced at another setting. Where that model and the meter differ by more than a quarter, the report says so and scales down.
Is a 60-second auto-suspend always right?
No. A suspended warehouse loses its local cache, and a warehouse with a query every minute or two would resume hundreds of times a day. That is why each saving is a range: the cautious end suspends after 300 seconds and the favorable end after 60, and the report shows how many resumes a day 60 seconds would mean.
Why are the savings ranges?
Each is a model, not a promise. Auto-suspend runs from 300 to 60 seconds. One size smaller runs from only the idle time getting cheaper to the whole warehouse halving when queries take no longer. Transient tables run from Fail-safe alone to Fail-safe and Time Travel. The size change is priced after the auto-suspend change, so the modeled savings add up.
Which prices does the report use?
Snowflake’s on-demand list price per credit for your edition, across 48 commercial regions, and on-demand storage per TB a month, from its consumption table read on 2026-11-13. Query 1 returns your region, so the prices follow it. On a capacity contract, type your own price per credit and every figure follows. Snowflake does not define a TB, so the check counts 1024 to the fourth power bytes, which gives the lower figure.
Does it handle Gen2 and Snowpark-optimized warehouses?
Yes, when SHOW WAREHOUSES says so. Gen2 costs 1.35 times the standard rate on AWS and Google Cloud and 1.25 times on Azure. Snowpark-optimized warehouses are priced at the default 16X memory. Where the result does not say, standard warehouses are priced as Gen1 and the report warns you.
Why is there no saving for query rewrites, clustering or background services?
The results show what that work costs now, not whether it can be avoided. A query that reads most of a table, a shape that runs every few minutes or automatic clustering on a busy table are leads, listed with what they cost a month and marked to investigate. They are never added to the modeled savings.
Can Finitizer look at my results with me?
Yes. Under the report, "Share for a review" saves the results you loaded to Finitizer, including warehouse and database names and query hashes, only once you tick the consent box and press Save. It gives you a reference to quote when you book a review. Shared files are kept for up to 12 months.
Can a script or an AI agent use this?
Yes, with no key or account. POST your results to /snowflake-cost-check/api and get the same report as the page, as JSON or Markdown. What you send is reported on in memory and not kept. data.json describes the method, the queries, every column and the prices.
Related tools
Snowflake Cost Calculator
Snowflake bills while your warehouse is running, not only while it runs queries.
OpenWarehouse Cost Translator
What would this BigQuery workload cost on Snowflake or Databricks?
OpenBigQuery Cost Check
Read-only queries, your own console, a report modeled at list price.
OpenMore tools for: Analytics and warehouses, Storage and lifecycle
A report is a snapshot. The bill keeps moving.
Finitizer does this for BigQuery today. Snowflake and Redshift support is on the way.
See how Finitizer works