Explanation
Why the waste happens and who it affects.
For as long as the query is running, the warehouse will remain active and accrue costs. Proper timeout settings help terminate inefficient queries, free up compute capacity, and allow the warehouse to become idle sooner, making it eligible for auto-suspend once the inactivity timer is reached.
Billing model
The pricing dimensions that drive this cost.
- Virtual warehouses consume Snowflake credits per second while running, with a 60-second minimum each time a warehouse starts or resumes, at an hourly rate set by warehouse size
- A warehouse keeps running, and consuming credits, while any query on it is executing, so a runaway query can keep it active until STATEMENT_TIMEOUT_IN_SECONDS is reached (default 172800 seconds, or 2 days)
- Suspended warehouses consume no credits, but auto-suspend can only start once running queries have ended
How to detect
4 checks to find it in your estate.
- Review account-level query timeout settings to confirm if a global policy shorter than the default is enforced
- Identify warehouses with no customized query timeout configured for workloads requiring exceptions
- Evaluate historical query run durations to detect unusually long-running queries that could benefit from timeout enforcement
- Validate with application owners whether specific workloads legitimately require extended query durations before setting tighter policies
How to fix
5 ways to remove the waste.
- Configure a conservative account-level query timeout policy to limit maximum query execution times (e.g., 4-12 hours based on environment needs).
- Apply customized warehouse-level or user-level timeout policies for workloads that genuinely require longer execution windows. When the timeout is set both on the warehouse and in the session hierarchy (account, user, session), the lowest non-zero value applies, so a longer user-level value only helps if the warehouse limit is also long enough; routing long-running jobs to a dedicated warehouse with a higher STATEMENT_TIMEOUT_IN_SECONDS is often simplest.
- Regularly review and adjust query timeout settings as workload patterns evolve.
- Coordinate changes with data engineering teams to avoid unintended interruption of legitimate long-running jobs.
- Setup anomaly detection on long running queries
Documentation
Vendor references for pricing and configuration.