Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 18333 invoked from network); 16 Feb 2011 01:12:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2011 01:12:28 -0000 Received: (qmail 89702 invoked by uid 500); 16 Feb 2011 01:12:26 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 89644 invoked by uid 500); 16 Feb 2011 01:12:26 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 89636 invoked by uid 99); 16 Feb 2011 01:12:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 01:12:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tyler@datastax.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-ww0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 01:12:20 +0000 Received: by wwi17 with SMTP id 17so3765848wwi.1 for ; Tue, 15 Feb 2011 17:11:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.188.67 with SMTP id z45mr69041wem.7.1297818717234; Tue, 15 Feb 2011 17:11:57 -0800 (PST) Received: by 10.216.181.4 with HTTP; Tue, 15 Feb 2011 17:11:57 -0800 (PST) X-Originating-IP: [64.132.24.248] In-Reply-To: <4D5B2314.2030009@pdf.com> References: <4CD1B8EA.3050706@pdf.com> <4CD1EBF9.6040507@pdf.com> <4D5B2314.2030009@pdf.com> Date: Tue, 15 Feb 2011 19:11:57 -0600 Message-ID: Subject: Re: latest rows From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016368319509fa696049c5bf7d7 --0016368319509fa696049c5bf7d7 Content-Type: text/plain; charset=ISO-8859-1 > 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 Maintainer of the pycassa Cassandra Python client library --0016368319509fa696049c5bf7d7 Content-Type: text/html; charset=ISO-8859-1

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
Maintainer of the pycassa Cassandra Python client library

--0016368319509fa696049c5bf7d7--