Finding out how much of each table your queries really read
The provider received a per-table picture of where pruning had degraded and what it was costing, with recommendations weighed against reclustering credits rather than presented as free. The largest ta…
Overview
A market data provider had tables in the tens of billions of rows where query cost had grown out of proportion to result size. Clustering keys had been defined years earlier against query patterns that had since changed. AceMQ assessed pruning effectiveness across the largest tables.
Challenge
Snowflake performance and cost both come down to how many micro-partitions a query has to scan. When clustering keys stop matching filter predicates, pruning degrades quietly — queries keep returning correct results while scanning progressively more data. Automatic clustering also carries its own credit cost, which has to be weighed against the scanning it avoids.
Environment
Snowflake on Azure holding multi-year tick and reference data queried by research and reporting workloads.
Approach
AceMQ measured partitions scanned against partitions total for the dominant query patterns on each large table, which gives a direct read on pruning effectiveness. Candidate clustering keys were then evaluated against both the scanning they would avoid and the reclustering credits they would consume.
Solution
- 1Measured partitions scanned versus total partitions per query pattern to quantify actual pruning effectiveness
- 2Compared current clustering keys against the filter predicates queries use today rather than at design time
- 3Evaluated candidate clustering keys against both scan reduction and ongoing reclustering credit cost
- 4Assessed clustering depth on the largest tables to identify where reclustering was not keeping pace
- 5Reviewed table design for cases where partitioned tables or search optimization fit better than clustering
- 6Delivered per-table recommendations with expected scan reduction and credit impact stated for each
Outcome
The provider received a per-table picture of where pruning had degraded and what it was costing, with recommendations weighed against reclustering credits rather than presented as free. The largest tables were prioritized, where restored pruning cut scanned partitions substantially.
Technologies
Related Use Cases
Snowflake Warehouse Right-Sizing and Credit Consumption Consulting
Restructuring warehouse sizing, auto-suspend policy, and workload isolation to bring credit consumption in line with the work actually being done.
Snowflake Ingestion Pipeline Support
Ongoing support for Snowpipe, stream, and task failures including stale streams past their retention window and silent partial-load conditions.
Ready for a Snowflake Health Check?
AceMQ's senior Snowflake engineers have handled this exact type of engagement before. Whether you need architectural guidance, hands-on remediation, or an ongoing managed partnership, we're ready to help.