Restricting queries using WHERE clauses

Describes restrictions of partition and clustering columns in a WHERE clause.

Tables have two types of columns with special roles: the partition key and the clustering columns. Together they define the primary key:

  • Partition key (PK) columns: The first part of primary key defines the hash that is used to spread data evenly across the data center.
  • Clustering columns: The last part of the primary key that orders the data within a partition.

Partition keys, clustering, and normal columns have different sets of restrictions within the WHERE clause. Those restrictions differ depending of the type of command: SELECT, UPDATE, or DELETE.