Snowflake Costs & Billing Dashboard β Monitoring Tips
π¬ Story Time β βWhy Did Our Snowflake Bill Jump Last Month?!ββ
Arjun, a cloud analytics lead, faces a sudden firestorm.
The CFO walks into the engineering bay:
βSnowflake costs went up 38% last month. What happened?β
Arjun panics.
Analysts ran expensive ad hoc queriesβ¦
A forgotten warehouse stayed running all weekendβ¦
ETL jobs scaled up concurrencyβ¦
Materialized views refreshed too frequentlyβ¦
He realizes the truth:
βWe didnβt monitor anything.β
Time to learn Snowflakeβs powerful cost management tools.
π° 1. Understanding What Drives Snowflake Costsβ
Before touching dashboards, Arjun learns the 3 cost pillars:
1. Compute (Warehouses)β
- Biggest cost component
- Credits billed per second
- Depends on warehouse size + runtime
2. Storageβ
- Managed cloud storage
- Charged monthly based on TB stored
3. Cloud Services Layerβ
- Metadata, optimization, result caching
- Small but visible for extremely high query volumes
Arjunβs mission: Monitor, optimize, and reduce.
π 2. Billing & Cost Dashboard (Snowflake UI Overview)β
Snowflake provides a built-in Billing Dashboard showing:
- Total credits consumed
- Cost over time
- Warehouse-level cost
- Query type cost distribution
- Materialized view maintenance cost
- Cloud services usage
Arjun checks:
Admin β Cost Management β Usage β Billing Dashboard
He immediately spots:
- A runaway XL warehouse
- Unused but running compute clusters
- Refresh-heavy materialized views
The dashboard becomes his new best friend.
π 3. Monitoring Credit Usage Using SQLβ
Arjun also queries ACCOUNT_USAGE views for deeper insights.
Daily credit consumption:β
SELECT
DATE(start_time) AS day,
SUM(credits_used) AS total_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
GROUP BY day
ORDER BY day;
Warehouse-level cost:β
SELECT
warehouse_name,
SUM(credits_used) AS credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
GROUP BY warehouse_name;
Query-level cost (who is the offender?)β
SELECT
user_name,
warehouse_name,
total_elapsed_time/1000 AS seconds,
credits_used_cloud_services,
query_text
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
ORDER BY credits_used_cloud_services DESC
LIMIT 20;
Arjun instantly identifies βexpensive users.β
β±οΈ 4. Resource Monitors β Your βCost Airbagsββ
Arjun sets up Snowflake Resource Monitors to stop overspending.
Create a resource monitorβ
CREATE RESOURCE MONITOR warehouse_budget
WITH CREDIT_QUOTA = 500
TRIGGERS ON 80 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND;
Attach it to a warehouse:
ALTER WAREHOUSE etl_wh SET RESOURCE_MONITOR = warehouse_budget;
Now:
- At 80% β sends alert
- At 100% β automatically suspends the warehouse
No more weekend runaway compute!
π§ 5. Identifying Cost Spikes β What to Look Forβ
Arjun creates a checklist for cost anomalies:
β Long-running queriesβ
β Warehouse left runningβ
β Over-provisioned warehouse sizesβ
β Materialized view auto-refresh spikeβ
β High concurrency settingsβ
β Data transformations using large warehouse sizesβ
β Unused data retained too longβ
ποΈ 6. Optimizing Compute Costs β Pro Tipsβ
πΈ Use Auto-Suspend (Most Important!)β
ALTER WAREHOUSE analytics_wh
SET AUTO_SUSPEND = 30, AUTO_RESUME = TRUE;
πΈ Scale down warehouse sizeβ
Most workloads can run on SMALL or MEDIUM.
πΈ Use multi-cluster only when neededβ
Avoid:
MIN_CLUSTER_COUNT=3, MAX_CLUSTER_COUNT=5
Use auto-scaling cautiously.
πΈ Use task-level compute instead of warehousesβ
Snowflake Tasks run on serverless compute β cost-efficient for small jobs.
πͺ 7. Storage Optimization Tipsβ
β Use Time Travel efficientlyβ
Reduce default retention:
ALTER TABLE big_table SET DATA_RETENTION_TIME_IN_DAYS = 1;
β Drop old transient tablesβ
DROP TABLE IF EXISTS temp_results;
β Archive historical data to cheaper cloud storage (external stage)β
Snowflake storage is good β but not the cheapest for cold data.
π οΈ 8. Cloud Services Cost β Why It Increasesβ
Arjun notices cloud services costs spike due to:
- Long metadata scans
- Queries retrieving massive result sets
- Excessive repeated query parsing
- Non-pruned partitions
- Large transactions
Fix: rewrite queries to prune micro-partitions.
π¦ 9. Build Cost Dashboards in BI Toolsβ
Arjun creates a BI dashboard (Looker, Power BI, Tableau) using:
WAREHOUSE_METERING_HISTORYQUERY_HISTORYMETERING_HISTORYMATERIALIZED_VIEW_REFRESH_HISTORY
He shares it with finance and leadership.
Result: full transparency.
π§ Best Practices Summaryβ
- Enable auto-suspend on all warehouses
- Use resource monitors for budgets
- Prefer smaller warehouse sizes, scale only when needed
- Monitor materialized view refresh costs
- Use result cache & warehouse cache
- Track costs per role/user regularly
- Archive cold data outside Snowflake
- Use query history to find expensive workflows
π Real-World Ending β βWe Saved 42% in One Quarterβ
After implementing these practices:
- Compute waste dropped dramatically
- Dashboards exposed expensive queries
- ETL pipelines migrated to optimized warehouse sizes
- Materialized views were tuned
- Business teams developed awareness
The CFO congratulates Arjun:
βThis is what cost governance looks like. Great work!β
π Summaryβ
Snowflake provides powerful tools to manage and reduce costs:
β Billing Dashboardβ
β Usage History Viewsβ
β Resource Monitorsβ
β Query-Level Cost Insightsβ
β Warehouse Optimization Techniquesβ
Mastering these ensures a cost-efficient, scalable, and predictable Snowflake environment.
π Next Topic
Snowflake with Python, PySpark, Databricks β Enterprise Integration