thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Clustering Key

One or more columns or expressions designated to co-locate similar rows in the same micro-partitions of a large Snowflake table, improving pruning.

Definition

Clustering keys suit very large (multi-terabyte) tables with selective filters on specific columns and relatively infrequent changes. Automatic Clustering then maintains them as a serverless service that costs credits. Choose keys with enough cardinality for pruning but not unique values such as IDs.

Example

ALTER TABLE events CLUSTER BY (event_date, region);

Exam tip

Don't cluster small tables or tables with heavy DML; it costs credits and gains little.

Related terms