When does upsizing a Snowflake warehouse lower credits? A query-history tutorial
Right-size from QUERY_HISTORY instead of guessing, and test one size up before you commit
Upsizing a Snowflake warehouse lowers credits when the larger size finishes the same work in less than half the time, because each size step doubles the hourly credit rate. As Snowflake's warehouse considerations documentation explains, a bigger warehouse is not automatically faster for every query. The cases where it wins are mostly queries that spill to local or remote storage on the smaller size. This tutorial shows how to find them in query history and prove the saving before you change anything.
Key Takeaways
- •Each Snowflake warehouse size doubles the credits per hour (X-Small is 1, Small is 2, Medium is 4, Large is 8), so a size step pays for itself only if runtime drops by more than half.
- •If runtime merely halves, the credit cost is flat. If it drops by more than half, upsizing is cheaper. If it drops by less, upsizing costs more.
- •Queries that spill to local or remote storage are the usual source of better-than-linear speedups, because the larger size adds memory and removes the spill.
- •QUERY_HISTORY exposes the spill columns, so you can shortlist upsizing candidates with one query instead of testing every warehouse.
- •Always run a before-and-after test on one representative workload at the next size up. Do not resize a shared warehouse from a single query's timing.
When does upsizing a Snowflake warehouse lower credits? The break-even rule
Snowflake bills warehouse compute in credits per hour, and the rate doubles with each size, as described in Snowflake's compute cost documentation. Billing is per second after a 60-second minimum each time a warehouse resumes. So the cost of a run is the hourly rate multiplied by the seconds it ran. That gives a simple break-even rule.
| Size | Credits per hour | Runtime that breaks even vs the size below |
|---|---|---|
| X-Small | 1 | Baseline |
| Small | 2 | Half the X-Small runtime |
| Medium | 4 | Half the Small runtime |
| Large | 8 | Half the Medium runtime |
| X-Large | 16 | Half the Large runtime |
Take a query that runs 20 minutes on an X-Small. That costs about 0.33 credits. On a Small it must finish in under 10 minutes to cost less than that. If it finishes in 4 minutes, it costs about 0.13 credits, so upsizing cut the bill by more than half while also saving 16 minutes of waiting. The rest of this tutorial is about finding the queries that behave like that one.
Step 1: Pull a week of query history for one warehouse
Start with the QUERY_HISTORY view in ACCOUNT_USAGE. Pick one warehouse, not the whole account. Filter on WAREHOUSE_NAME and a START_TIME range of the last 7 days, and keep only rows where EXECUTION_STATUS is SUCCESS. Select QUERY_ID, WAREHOUSE_SIZE, TOTAL_ELAPSED_TIME, EXECUTION_TIME, QUEUED_OVERLOAD_TIME, BYTES_SCANNED, BYTES_SPILLED_TO_LOCAL_STORAGE and BYTES_SPILLED_TO_REMOTE_STORAGE.
Note that ACCOUNT_USAGE views have ingestion latency, so very recent queries may be missing. Use the INFORMATION_SCHEMA table function if you need the last few minutes. Also confirm the warehouse size did not change during the window, since the WAREHOUSE_SIZE column is recorded per query and mixed sizes will blur your averages.
Step 2: Shortlist queries that spill
Sort the result by BYTES_SPILLED_TO_REMOTE_STORAGE descending, then by local spill. A query that spills to remote storage is writing intermediate results to cloud storage because the warehouse ran out of memory and local disk, and that is typically much slower than staying in memory. Moving up a size doubles the nodes and therefore the memory available, which can remove the spill entirely. This is the main reason a larger warehouse can be cheaper per query.
Ignore queries with no spill that run for a few seconds. For those, the 60-second minimum and fixed overheads dominate, and a larger size rarely shortens them enough to matter. Also separate queueing from slowness: if QUEUED_OVERLOAD_TIME is high but EXECUTION_TIME is fine, the problem is concurrency, and a larger size is the wrong fix. Multi-cluster scaling or splitting workloads addresses that.
Step 3: Compute credits per query at the current size
For each shortlisted query, estimate credits as the size's hourly rate multiplied by EXECUTION_TIME in hours. This is an estimate for comparing options, not an invoice: actual billing is per warehouse running time, and concurrent queries share it. For a rigorous account-level number, reconcile against WAREHOUSE_METERING_HISTORY. For ranking candidates, the per-query estimate is enough.
Then total the estimate by query pattern, such as a nightly model or a specific dashboard query. A single heavy query that runs once a day matters more than a thousand cheap ones only if its total credits are larger, so rank by total estimated credits per pattern per week, not by single-run duration.
Step 4: Run one representative workload one size up
Pick the top one or two patterns. Run the same workload on the next size up, on a dedicated test warehouse if you can, so other users do not skew the timing. To avoid result-cache hits, clear the effect by changing the test deliberately: either disable the result cache for the session with USE_CACHED_RESULT set to false, or compare against a run you know was uncached. Record EXECUTION_TIME and both spill columns for the new run.
Run it at least three times. Warehouse cache warm-up makes the first run on a freshly resumed warehouse slower, and one lucky run proves nothing. Compare the median run to your Step 3 baseline.
Step 5: Apply the break-even rule and decide
- •Runtime dropped by more than half and spill is gone: upsize. You save credits and time.
- •Runtime dropped by about half: credits are flat. Upsize only if the faster result has value, such as a tighter SLA.
- •Runtime dropped by less than half: stay on the smaller size. You would pay more for a modest speedup.
- •Spill remains at the larger size: try one more step, or rewrite the query (reduce the join fan-out, filter earlier) before buying more compute.
Be careful with shared warehouses. If one heavy query needs a Large but twenty light queries share the warehouse, upsizing the warehouse raises the cost of everything. The cleaner move is to route the heavy query to its own warehouse of the right size and let it auto-suspend. That keeps the light workload cheap and charges the large size only while the heavy job runs.
Step 6: Set auto-suspend so the bigger size does not idle
A larger warehouse that sits idle burns credits at double the rate. After resizing, set AUTO_SUSPEND to a short value that fits the workload, and confirm AUTO_RESUME is on. Remember the 60-second minimum on each resume, so very frequent tiny queries can make an aggressive suspend setting counterproductive. Check WAREHOUSE_METERING_HISTORY after a week and compare credits per day before and after. Judge the change by that number, not by the single-query test.
Doing this with an agent instead of by hand
The six steps above are mechanical, which is why we automate them. Our Cost Agent, one of the fifteen MCP-native agents in Data Workers, can answer questions like "How much are we spending on Snowflake this month?" and "What's causing the warehouse queue to spike?" from inside Claude Code or Cursor. It reads query history, ranks spilling patterns by weekly credits and drafts the resize or workload-split proposal. In the open-source edition it is read-only, so it recommends and never alters a warehouse. Writes, approval workflows and audit trails are part of Pro.
Because every agent is an MCP server, the same question can chain across the platform. We covered how the Connectors Agent links Snowflake and the rest of your stack in a separate post. That shared context is what lets a sizing recommendation account for the downstream dashboards and models that depend on a warehouse, which a single query's timing cannot show. The agents expose their tools over the Model Context Protocol, so any MCP-compatible client can call them.
If you want the broader picture of how we move data platforms to agentic platforms, our posts on autonomous data operations explain the per-domain autonomy dial: you decide which domains an agent may change on its own and which stay recommendation-only. Warehouse sizing is a good first domain to hand over because the change is reversible in seconds.
Common mistakes when upsizing
- •Judging by a single query's runtime instead of total weekly credits per pattern.
- •Forgetting the result cache, which makes the second run look dramatically faster at any size.
- •Upsizing a shared warehouse for one heavy job and raising the cost of every light query.
- •Treating queueing as a sizing problem when it is a concurrency problem.
- •Leaving a large warehouse with a long auto-suspend timeout.
Frequently Asked Questions
Does doubling the warehouse size always halve the runtime? No. Snowflake's own guidance notes that larger warehouses do not always make a query faster, and small queries often see little or no gain. Scaling is closest to linear for large scans and heavy joins, and better than linear when the smaller size was spilling.
How do I know a query is a good upsizing candidate? Look for nonzero BYTES_SPILLED_TO_REMOTE_STORAGE or BYTES_SPILLED_TO_LOCAL_STORAGE in QUERY_HISTORY on a query that runs for minutes. Spilling queries are the ones most likely to run more than twice as fast one size up.
Is it cheaper to run a small warehouse longer or a big warehouse shorter? Only the break-even rule answers that. If runtime falls by more than half when the size doubles, the big warehouse is cheaper. If it falls by exactly half, they cost the same. If less, the small warehouse wins.
Should I use multi-cluster warehouses instead of upsizing? Use multi-cluster scaling when the symptom is queueing from many concurrent queries. Use a larger size when individual queries are slow or spilling. They solve different problems.
Can Data Workers resize my warehouse automatically? In the open-source edition the agents are read-only and recommend a change. In Pro, writes are available behind approval workflows with audit trails, and the autonomy dial lets you decide whether sizing changes need a human approval or run on their own.