The sweet spot for Cassandra secondary indexing | Richard Low's blog
At a high level, secondary indexes look like normal column families, with the indexed value as the partition key.
For user_accounts, the partition key is username and that is the key the data is indexed with in Cassandra's SSTables. For the index, the partition key is the country and the column name is the username. As an example, suppose there are two users in the UK, the data stored in Cassandra is (showing only username and country) in JSON form:
Read full article from The sweet spot for Cassandra secondary indexing | Richard Low's blog
No comments:
Post a Comment