Database Reference
In-Depth Information
updates to her followers. On the other hand, the question, "Who does
alice
follow?" is
only necessary when
alice
or another user wishes to see a list of those users. By struc-
turing the table with the
followed_username
column as the partition key, we ensure
that super-efficient partition key lookup is available for the most important question, and
use secondary index lookup for less essential queries.
Note
For more on when to use secondary indexes, and when not to, see the chapter from the
DataStax Cassandra documentation:
http://www.datastax.com/documentation/cql/3.1/cql/