O'Reilly logo

Cassandra High Performance Cookbook by Edward Capriolo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing secondary data orderings or indexes

The row key determines which nodes the data is stored on. The row key is also used to locate the data on disk in the underlying data files. These factors make searching by row key optimal. The columns of a row key are sorted by the column name, making searching for specific columns inside a specific key optimal. At times, one or more ordering of data may be required. Storing data multiple times in different ways can be done to support different requests. This recipe shows how to create two orderings of a mailbox—the first being efficient to search messages by time, and another to search messages by user.

Getting ready

Create the required keyspace and column families for this recipe.

[default@unknown] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required