# Suboptimal query timeout configuration | Cloud Efficiency Hub

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/suboptimal-query-timeout-configuration

If no appropriate query timeout is configured, inefficient or runaway queries can execute for extended periods (up to the default 2-day system limit).

By: Simar Arora

Updated: 2026-09-28

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

# Suboptimal Query Timeout Configuration

The short version

If no appropriate query timeout is configured, inefficient or runaway queries can execute for extended periods (up to the default 2-day system limit).

[Simar Arora](https://www.linkedin.com/in/simarpreet-arora/)

Value Engineer - FinOps @ Snowflake

Snowflake service

[Snowflake Virtual Warehouse](https://www.pointfive.co/efficiency-hub/cloud-services/snowflake-virtual-warehouse)

Category

[Compute](https://www.pointfive.co/efficiency-hub/service-category/compute)

Reference

CER-0129

Type

Inefficient Configuration

## 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.

- [Query Cost Attribution  docs.snowflake.com](https://docs.snowflake.com/en/sql-reference/account-usage/query_attribution_history)

- [Query History  docs.snowflake.com](https://docs.snowflake.com/en/sql-reference/functions/query_history)

- [Parameters  docs.snowflake.com](https://docs.snowflake.com/en/sql-reference/parameters)

- [Understanding compute cost  docs.snowflake.com](https://docs.snowflake.com/en/user-guide/cost-understanding-compute)

## Related inefficiencies

[Browse the library](https://www.pointfive.co/efficiency-hub)

- Snowflake Virtual Warehouse  CER-0132

### [Suboptimal Warehouse Auto-Suspend Configuration](https://www.pointfive.co/efficiency-hub/inefficiencies/suboptimal-warehouse-auto-suspend-configuration)

If auto-suspend settings are too high, warehouses can sit idle and continue accruing unnecessary charges. Tightening the auto-suspend window ensures that the warehouse shuts down quickly once queries complete, minimizing credit waste while...

Compute

- Snowflake Virtual Warehouse  CER-0514

### [Snowflake Multi-Cluster Warehouse Pinned to Maximized Mode](https://www.pointfive.co/efficiency-hub/inefficiencies/snowflake-multi-cluster-warehouse-pinned-to-maximized-mode)

A multi-cluster warehouse (Enterprise Edition and above) can run several clusters of the same size to absorb concurrent queries. When its minimum and maximum cluster counts are set to the same value greater than 1, it runs in Maximized...

Compute

- Snowflake Virtual Warehouse  CER-0168

### [Underutilized Snowflake Warehouse](https://www.pointfive.co/efficiency-hub/inefficiencies/underutilized-snowflake-warehouse)

Underutilized Snowflake warehouses occur when a workload is assigned a larger warehouse size than necessary. For example, a workload that could efficiently execute on a Medium (M) warehouse may be running on a Large (L) or Extra Large (XL)...

Compute

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

