Physical data model

Finally, you might want to make further optimizations to the table design to speed up the queries. These optimizations could include the following:

  • Splitting partitions in a table to keep their size manageable
  • Merging partitions to speed up queries
  • Adding columns for efficient querying

Querying non-primary key columns is either not supported or very expensive. In certain situations, it might be useful to create secondary indexes or materialized views to facilitate efficient querying on non-primary key columns. Some scenarios also require us to use distributed counters or lightweight transactions. We will take a look at all of the aforementioned features in the following chapters.

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.