April 2017
Beginner to intermediate
360 pages
9h 35m
English
Although secondary indexes give us a reasonably efficient way to look up rows using a non-partition key column, they're not as efficient as queries based on the primary key we've explored in the previous chapters. This is because lookup by a secondary index is a two-step process. First, Cassandra will access the secondary index to find the primary keys of all rows matching the query. Second, it will access the table itself to retrieve the matched rows.
The second step will generally involve querying over many partitions or at least over disjoint ranges of a single partition. These random reads over the data can never be as efficient as a single focused read of one range of one ...
Read now
Unlock full access