Intermediate
Open
Pro
A Warehouse Bill Doubled Overnight — Diagnose the MPP Cost Spike
Your team runs a Snowflake warehouse. Overnight compute cost for the "analytics" virtual warehouse roughly doubled, with no change to dashboard usage patterns or user count. Investigating, you find:
- A new nightly job was added that runs
SELECT * FROM events WHERE event_type = 'click'against a 4-billion-roweventstable that is partitioned (clustered) byevent_date, notevent_type. - The
eventstable has grown 3x in the last quarter but was never re-clustered or reviewed.
- Explain, using the MPP/micro-partition pruning concept, why this specific query is expensive relative to what it "looks like" it should cost.
- Propose two concrete fixes and explain the mechanism by which each one reduces cost.
- A teammate proposes simply setting the virtual warehouse to a smaller size to cut cost. Would that fix the actual problem? Explain what it would and wouldn't change.
Share this question