I recently joined a firm where the Snowflake monthly bill is spiraling out of control. We have several warehouses running 24/7, and I suspect auto-suspend settings are misconfigured. What are the best strategies to monitor credit consumption? Are there specific resource monitors or SQL scripts that can help identify "expensive" queries or users who are draining our budget?
3 answers
Cost governance is crucial. First, check your "Auto-Suspend" settings; for most BI workloads, 60 seconds is plenty. You should also implement Resource Monitors at both the account and warehouse levels to set hard quotas that kill warehouses if they exceed a credit limit. Use the QUERY_HISTORY view to find long-running queries and look for high "bytes scanned" vs "bytes spilled to disk." Spilling to disk indicates your warehouse size is too small for the data, causing inefficient processing and wasted credits
Is it possible to set up automated alerts that email our Slack channel when a specific warehouse reaches 80% of its monthly credit quota?
I highly recommend using Query Tagging. By tagging sessions with a project name, you can see exactly which department is spending the most money in your billing reports.
Adding to Linda's point, this makes internal cross-charging much easier. If the Marketing team's queries are costing $5k a month, the data shows it clearly.
James, you can definitely do that. While Snowflake has built-in email notifications for Resource Monitors, many teams use a Python script with the Snowflake Connector to query the WAREHOUSE_METERING_HISTORY view and push custom alerts to Slack via a webhook. This gives you much more granular control over who gets notified and how often the checks occur throughout the day.