- Learning Apache Cassandra(Second Edition)
- Sandeep Yarabarla
- 72字
- 2021-07-03 00:19:34
Anatomy of a single-column primary key
Now that you understand the distinction between a partition key and a clustering column, you might be wondering which role the username column plays in the users table.
As it turns out, it's a partition key. All Cassandra tables must have a partition key; clustering columns are optional. In the users table, each row is its own tiny partition; no row is grouped with any other.