Creating time UUID ranges

In the preceding query, we encounter two new CQL functions: MINTIMEUUID and MAXTIMEUUID. These functions form perhaps the most powerful components of Cassandra's toolkit for working with timestamp-based UUIDs.

As you learned in Chapter 1, Getting Up and Running with Cassandra, version 1 UUIDs are generated using a timestamp, and this timestamp is the highest order consideration in how UUIDs are ordered. However, for each timestamp, there are about three hundred trillion possible UUIDs.

Since UUIDs are just numbers, it follows that for any given timestamp, there is a smallest UUID and a largest UUID. This is what the MINUUID and MAXUUID functions tell us. Cassandra doesn't give us a way to directly see the output ...

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.