Snowflake Query & Workload Performance
Investigate expensive analytical workloads by connecting query history, pruning, spills, clustering, concurrency and warehouse behavior to cost and latency.
Investigate expensive analytical workloads by connecting query history, pruning, spills, clustering, concurrency and warehouse behavior to cost and latency.
Rank expensive or regressed workload patterns rather than optimizing one isolated SQL statement.
Review whether data layout and query predicates are creating avoidable scan amplification.
Separate query inefficiency from concurrency/capacity needs before simply scaling warehouse size.
SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY keeps a year of queries, with up to 45 minutes of latency. Grouping by query_parameterized_hash, warehouse and query_tag shows which workload patterns account for elapsed time and warehouse use. The columns that usually explain a slow or expensive pattern:
| Columns | What they suggest |
|---|---|
partitions_scanned vs partitions_total | Whether predicates prune micro-partitions. Scanning most partitions for a narrow question points to data layout or predicate shape. |
bytes_spilled_to_local_storage, bytes_spilled_to_remote_storage | Memory pressure in joins, sorts or aggregations. Remote spilling is the expensive case. |
queued_overload_time | Queries waiting because the warehouse is busy: a concurrency problem, not a single-query problem. |
queued_provisioning_time | Time waiting for a warehouse to start or resume. |
compilation_time vs execution_time | Whether time goes to planning very large or generated SQL or to running it. |
A common pattern is one warehouse serving dashboards, ad hoc analysis, scheduled transformations and loads. A heavy batch job then shows up as queueing on interactive queries, and the usual response is a bigger warehouse for everyone.
queued_overload_time is low and the slow pattern scans most partitions, more compute will cost more without fixing the cause.From Snowflake's documentation for QUERY_HISTORY and multi-cluster warehouses, checked 13 October 2026.
Start with query history, warehouse configuration and the cost or latency symptom. Scope is agreed once the problem and evidence are clear.
Prefer to talk first? Book a 20-minute triage call.