Restricting queries using WHERE clauses

Describes restrictions of partition and clustering columns in 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, define the hash that is used to spread data evenly across the data center.
  • Clustering columns: The last part of the primary key, order 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.