Database Reference
In-Depth Information
If we decide that retrieving all replies to a given user's status updates is an important ac-
cess pattern, we can choose a different primary key arrangement for status update replies.
If we made status_update_username alone the partition key, with
status_update_id and id together forming the clustering column, then the resulting
table would be ideally suited for the query in question. It would still be possible to look up
the replies to a single status update, although it would not be quite as efficient as in our
original formulation. This sort of reasoning, known as query-driven schema design, is crit-
ical to designing efficient Cassandra schemas; we will discuss it at length in the Designing
around queries section of Chapter 5 , Establishing Relationships .
Search WWH ::




Custom Search