Can query on partition key, clustering columns and indexed columns.
You can’t filter by columns that aren’t part of the keys, and they must be in order.
e.g. if your key is like so:
PRIMARY KEY (Id, Timestamp, IsDisabled)
Then querying just on “Id” and “IsDisabled” will give you the error:
PRIMARY KEY column "isdisabled" cannot be restricted (preceding column “timestamp” is not restricted)
You can query on:
Id / Timestamp
Id / Timestamp / IsDisabled
“Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING”
This happens when you query on a field but you’re not filtering on the primary key; it may mean a scan across all nodes.
Partition keys are not ordered.
Clustering columns are ordered
Can order query by clustering columns
Default order on schema WITH CLUSTERING ORDER