Skip to main content

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_HISTORY
  • QUERY_HISTORY
  • METERING_HISTORY
  • MATERIALIZED_VIEW_REFRESH_HISTORY

He shares it with finance and leadership.

Result: full transparency.


🧠 Best Practices Summary​

  1. Enable auto-suspend on all warehouses
  2. Use resource monitors for budgets
  3. Prefer smaller warehouse sizes, scale only when needed
  4. Monitor materialized view refresh costs
  5. Use result cache & warehouse cache
  6. Track costs per role/user regularly
  7. Archive cold data outside Snowflake
  8. 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