What happens to the underlying table data when a CLUSTER BY clause is added to a Snowflake table?
When aCLUSTER BYclause is added to a Snowflake table, it specifies one or more columns to organize the data within the table's micro-partitions. This clustering aims to colocate data with similar values in the same or adjacent micro-partitions. By doing so, it enhances the efficiency of query pruning, where the Snowflake query optimizer can skip over irrelevant micro-partitions that do not contain the data relevant to the query, thereby improving performance.
References:
Snowflake Documentation on Clustering Keys & Clustered Tables1.
Community discussions on how source data's ordering affects a table with a cluster key
Lenna
8 months agoGlenn
8 months agoNoe
9 months agoLili
9 months agoCeleste
9 months agoFausto
9 months agoRyan
9 months agoKiley
10 months agoBilly
10 months agoPearlie
10 months agoKarl
10 months agoDanica
10 months agoEmeline
11 months agoOzell
11 months agoTawna
11 months agoBrandee
11 months agoEdgar
11 months agoQuinn
8 months agoElli
8 months agoLeota
8 months agoCordelia
8 months agoBettye
1 year agoVincenza
1 year ago