Re: latest rows

2011-02-16 Thread Alaa Zubaidi
Thank you guys ... On 2/16/2011 1:36 PM, Matthew Dennis wrote: +1 on avoiding OPP On Wed, Feb 16, 2011 at 3:27 PM, Tyler Hobbs wrote: Thanks for you input, but we have a set key that consists of name:timestamp that we are using.. and we need to also retrieve the oldest data as well.. Then

Re: latest rows

2011-02-16 Thread Matthew Dennis
+1 on avoiding OPP On Wed, Feb 16, 2011 at 3:27 PM, Tyler Hobbs wrote: > > Thanks for you input, but we have a set key that consists of name:timestamp >> that we are using.. and we need to also retrieve the oldest data as well.. >> > > Then you'll need to denormalize and store every row three wa

Re: latest rows

2011-02-16 Thread Tyler Hobbs
> Thanks for you input, but we have a set key that consists of name:timestamp > that we are using.. and we need to also retrieve the oldest data as well.. > Then you'll need to denormalize and store every row three ways: timestamp, inverted timestamp, and normal, if you want to be able to access

Re: latest rows

2011-02-16 Thread Alaa Zubaidi
Hi Tyler, Thanks for you input, but we have a set key that consists of name:timestamp that we are using.. and we need to also retrieve the oldest data as well.. Thanks On 2/15/2011 9:07 PM, Tyler Hobbs wrote: But wouldn't using timestamp as row keys cause conflicts? Depending on client be

Re: latest rows

2011-02-15 Thread Tyler Hobbs
> > But wouldn't using timestamp as row keys cause conflicts? > Depending on client behavior, yes. If that's an issue for you, make your own UUIDs by appending something random or client-specific to the timestamp. -- Tyler Hobbs Software Engineer, DataStax Maintainer of t

Re: latest rows

2011-02-15 Thread Tan Yeh Zheng
But wouldn't using timestamp as row keys cause conflicts? On Tue, 2011-02-15 at 19:11 -0600, Tyler Hobbs wrote: > > 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

Re: latest rows

2011-02-15 Thread Tyler Hobbs
> 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

latest rows

2011-02-15 Thread Alaa Zubaidi
Hi, What is the best way to retrieve the latest rows from a CF with OPP. We are using OPP and key range queries but I cannot find an easy way to get the latest 10 keys for example from a column family with 1000s of keys. I really don't want to create another CF to store row key nam