Selecting a slice of a partition

With a solid understanding of the UUID functions we're using in this query, we can now break down exactly what we're asking Cassandra to give us:

  • Rows in the alice partition
  • With an id that is greater than or equal to the minimum possible UUID generated on May 1, 2014
  • With an id that is less than or equal to the maximum possible UUID generated on May 31, 2014

This is a very common query pattern in Cassandra and is referred to as a range slice query. A range slice query selects a single partition key and a range of clustering column values. Like a query that is purely restricted by partition key, range slice queries are very efficient, as they take advantage of the underlying layout of the data in the table. ...

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.