When to use static columns

We've now seen two ways to model users, each of whom has many status updates. The first approach was simply to define a table for users and a table for their status updates; the relationship between the two is encoded in the key structure of user_status_updates. The second approach is to store all of the information in one users_with_status_updates table using static columns to associate user-level data with the username partition key rather than having a different value for each clustering column. Which is better?

The answer largely depends on how closely coupled the related data types are. If we expect that most of our interactions with user profile information will also involve interacting with the user's status ...

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.