{"id":"56562015-79a8-4af6-af08-f85a45a124de","task":"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","steps":["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)","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","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","Snowflake's Automatic Clustering service reclusters the table in the background; it incurs compute credit consumption visible in the Automatic Clustering billing line","Suspend automatic clustering on a table to stop incurring cost: ALTER TABLE orders SUSPEND RECLUSTER","Resume or drop the clustering key: ALTER TABLE orders RESUME RECLUSTER or ALTER TABLE orders DROP CLUSTERING KEY"],"gotchas":["Automatic Clustering is a paid service charged in Snowflake credits based on compute used for reclustering merges — enable it only on tables where query pruning benefits outweigh the ongoing reclustering cost","Defining a clustering key on a table with very low cardinality (e.g. a boolean column) provides no pruning benefit; choose high-cardinality columns that are frequently used as filters","The SYSTEM$CLUSTERING_INFORMATION function returns an estimate — average_depth values above 1 indicate overlapping micro-partitions and signal poor clustering that benefits from recluster operations"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:37.008Z"},"url":"https://mcp.waymark.network/r/56562015-79a8-4af6-af08-f85a45a124de"}