Snowflake Query Spilling to Local and Remote Storage

Snowflake query spilling occurs when a query needs more working memory than the warehouse provides. Intermediate data is written to local SSD or remote storage, which can increase runtime and warehouse credits.

Local and remote spill

Local spill uses storage attached to the warehouse. Remote spill uses storage outside the warehouse when local space is insufficient. Remote spilling generally adds more latency than local spilling because data must travel farther.

Spilling does not create a separate storage invoice line for the query. The query continues to consume warehouse compute while it spills, so the cost appears through warehouse credits and longer execution time.

Finding spill

The query profile reports bytes spilled to local and remote storage. Compare spill volume with warehouse size, bytes scanned, execution time, and concurrency. A query that spills only during concurrent workloads may need scheduling or workload separation rather than a permanently larger warehouse.

Pruning partitions, reducing intermediate rows, filtering earlier, and changing joins can reduce the working set. A larger warehouse can help when the query is memory-bound, but its higher credit rate must be included in the comparison.

Snowflake documents query profiles and warehouse sizing.