incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler Hobbs <ty...@datastax.com>
Subject Re: latest rows
Date Wed, 16 Feb 2011 01:11:57 GMT
> What is the best way to retrieve the latest rows from a CF with OPP.
>

Use inverted timestamps (for example, 2^64 - timestamp) with zeros for
padding as the row keys.

This way you can do a normal forward range scan and get the N latest rows.

-- 
Tyler Hobbs
Software Engineer, DataStax <http://datastax.com/>
Maintainer of the pycassa <http://github.com/pycassa/pycassa> Cassandra
Python client library

Mime
View raw message