beginnerCassandra — Partitioning, Replication & Consistency

What is the difference between a partition key and a clustering key in Cassandra?

Partition Key: determines which node(s) the row is stored on. Hashed by consistent hashing algorithm to determine a token, which maps to a node in the ring. All rows with the same partition key are stored together on the same node(s). Partition key is the ONLY field that can be in WHERE without ALLOW FILTERING. Clustering Key: determines the sort order of rows WITHIN a partition. Multiple rows wit

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.

What is the difference between a partition key and a clustering key in Cassandra?

Next Step

Continue to What are Cassandra consistency levels and when do you use each?← Back to all NoSQL questions