Define a Snowflake clustering key on a large table, monitor micro-partition pruning efficiency, and control automatic clustering cost

domain: docs.snowflake.com/en/user-guide/tables-clustering-micropartitions · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Identify the columns used most frequently in WHERE and JOIN predicates for a large table and define a clustering key: ALTER TABLE orders CLUSTER BY (order_date, region)
  2. Check the current clustering depth and overlap before and after: SELECT SYSTEM$CLUSTERING_INFORMATION('orders', '(order_date, region)') — returns average_depth and average_overlaps metrics
  3. Monitor query pruning efficiency in the query profile: look for 'Partitions scanned' vs 'Partitions total' in query details — high pruning ratio confirms the clustering key is effective
  4. Snowflake's Automatic Clustering service reclusters the table in the background; it incurs compute credit consumption visible in the Automatic Clustering billing line
  5. Suspend automatic clustering on a table to stop incurring cost: ALTER TABLE orders SUSPEND RECLUSTER
  6. Resume or drop the clustering key: ALTER TABLE orders RESUME RECLUSTER or ALTER TABLE orders DROP CLUSTERING KEY

Known gotchas

Related routes

Create a BigQuery partitioned and clustered table, then verify partition and cluster pruning with query cost estimation
cloud.google.com/bigquery/docs · 6 steps · unrated
Create a Snowflake resource monitor to cap warehouse credit spend and auto-suspend at a threshold
docs.snowflake.com · 5 steps · unrated
Chain Snowflake dynamic tables into a DAG using target_lag propagation
data-engineering · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans