Snowflake warehouse performance monitor and rightsizing alerts
Build a Snowflake warehouse rightsizing monitor. The goal is to catch warehouses that are over-provisioned (burning idle credits) or under-provisioned (causing query queuing) before they show up as a surprise on the bill or a performance complaint. Trigger it on a daily schedule (cron). Main steps, at a high level: Query Snowflake ACCOUNT_USAGE metadata for the last 7 days per warehouse: query queuing time, cold-start frequency, credit consumption vs. actual usage, and idle time. Score each warehouse against rightsizing signals — sustained queuing pressure, warehouses sized far above their peak load, frequent cold starts, and high idle-credit burn — with tunable thresholds. Flag critical warehouses with a concrete recommendation (scale up, scale down, or adjust auto-suspend/auto-scale settings). Post a summary to the platform/data team's Slack channel with the flagged warehouses and recommendations. Run entirely read-only against Snowflake. Tools used: Snowflake, Slack
What this prompt builds
This workflow monitors Snowflake warehouse performance by analyzing 7 days of ACCOUNT_USAGE metadata daily to identify queuing pressure, oversized warehouses, cold starts, and idle credit burn. It scores each warehouse, flags critical conditions with concrete recommendations, and alerts platform and FinOps teams via Slack before cost overruns appear on the monthly bill. The workflow helps data teams right-size compute resources to reduce waste while protecting query performance for analysts.
The problem
Snowflake warehouses are easy to over-provision and hard to right-size — they get created generously for a project and never revisited, leaving teams paying for idle compute while users elsewhere queue on under-provisioned resources. The performance signal (queuing, cold starts, idle credit burn) is buried in ACCOUNT_USAGE views that most people never check, so data platform and FinOps teams only learn about problems when the monthly bill arrives or analysts complain that Snowflake feels slow. This workflow surfaces that buried metadata as a daily, actionable health check: every morning it pulls 7 days of query history, warehouse load, and metering data, scores each warehouse, and flags four concrete conditions with attached recommendations — queuing pressure, oversized and underutilized warehouses, frequent cold starts, and idle credit waste. Critical and warning alerts go straight to Slack so the right people see problems the same day, and a dashboard exposes the full picture on demand for deeper investigation.
Solution and impact
The workflow replaces reactive, ad-hoc bill investigations with a standing rightsizing signal that cuts wasted spend on oversized warehouses while protecting query performance where it matters. It runs read-only against Snowflake with tunable thresholds, so teams can dial it to their own cost and performance tolerance without risk of changing live configurations. Data platform and FinOps owners get a defensible, daily view of where to act, and analysts benefit from faster queries once queuing is addressed and resources are correctly allocated.