Skip to main content

Snowflake warehouse management

Snowflake warehouse management is usually the fastest Snowflake cost optimization lever. Warehouses bill while running, including idle time after the last query, so aggressive auto-suspend and right-sizing often save more than query tuning.

chukei's suspend plugin watches real query flow at the proxy and can start in suggest-only mode before it is allowed to execute ALTER WAREHOUSE SUSPEND.

The optimization order

  1. Find idle warehouses with WAREHOUSE_METERING_HISTORY and QUERY_HISTORY.
  2. Set tighter auto-suspend values for interactive and BI workloads.
  3. Right-size warehouses that finish queries quickly without spilling.
  4. Automate safe suspend decisions after observing workload patterns.
  5. Record avoided credits in a signed evidence ledger.

Find idle Snowflake spend

SELECT warehouse_name,
SUM(credits_used) AS credits,
COUNT(DISTINCT DATE_TRUNC(hour, start_time)) AS metered_hours
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(day, -30, CURRENT_TIMESTAMP())
GROUP BY 1
ORDER BY 2 DESC;

Compare those metered hours against query activity. The difference is idle burn.

Suggest-only before enforce mode

For launch pilots, chukei should start with:

plugins:
suspend:
enabled: true
mode: suggest-only

Suggest-only mode records what chukei would have suspended without changing warehouse state. Move to enforce mode only after the savings projection and rollback rehearsal are accepted.

Right-sizing checks

A warehouse may be oversized when:

  • most queries complete quickly;
  • there is no remote spill;
  • concurrency is low;
  • cache hits cover the repeated read workload;
  • users are keeping a large warehouse warm for dashboard traffic.

Change one warehouse at a time, compare against the previous period, and keep query latency SLOs visible.

Next steps