Restricting queries using WHERE clauses
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
Identify partition keys to limit the query and retrieve data from specific nodes.
- Clustering columns
Restrict queries on clustering columns and find ranges across clustering segments.
- Retrieval using the IN keyword
Using the SELECT command with the IN keyword.
- Sorting and limiting results
Using the SELECT command for simple queries.