Clustering

Clustering physically sorts and groups a table's rows by one or more columns, within partitions. Queries that filter or join on these columns read fewer data blocks. It complements partitioning, in particular for high-cardinality columns such as a customer identifier.

Example

CREATE TABLE ventes PARTITION BY date_vente CLUSTER BY id_client AS SELECT * FROM brut.ventes;

Related concepts

The whole glossary