You will need to use OPP to perform range scans. Look for Range Queries on http://wiki.apache.org/cassandra/DataModel
Look at this to understand why range queries are not supported for RamdomPartitioner (https://issues.apache.org/jira/browse/CASSANDRA-1750) Thanks, Naren On Mon, Dec 27, 2010 at 8:35 AM, Roshan Dawrani <roshandawr...@gmail.com>wrote: > I had seen RangeSlicesQuery, but I didn't notice that I could also give a > key range there. > > How does a KeyRange work? Doesn't it need some sort from the partitioner - > whether that is order preserving or not? > > I couldn't be sure of a query that was based on order of the rows in the > column family, so I didn't explore that much. > > > > On Mon, Dec 27, 2010 at 9:55 PM, Narendra Sharma < > narendra.sha...@gmail.com> wrote: > >> Did you look at get_range_slices? Once you get the columns from super >> column, pick the first and last to form the range and fire the >> get_range_slice. >> >> Thanks, >> -Naren >> >> >> On Mon, Dec 27, 2010 at 6:12 AM, Roshan Dawrani >> <roshandawr...@gmail.com>wrote: >> >>> This silly question is retrieved back with apology. There couldn't be >>> anything easier to handle at the application level. >>> >>> rgds, >>> Roshan >>> >>> >>> On Mon, Dec 27, 2010 at 9:04 AM, Roshan Dawrani <roshandawr...@gmail.com >>> > wrote: >>> >>>> Hi, >>>> I have the following 2 column families - one being used to store full >>>> rows for an entity and other is an index table for having the TimeUUID >>>> sorted row keys. >>>> >>>> I am able to query the TimeUUID columns under the super column fine. But >>>> now I need to go to main CF and get the data and I want the rows in the >>>> same >>>> time order as the keys. >>>> >>>> I am using MultiGetSliceQuery to query the main entity data for the >>>> sorted keys, but the rows don't come back in the same order, which defeats >>>> the purpose of storing the time sorted subcolumns. I suppose for each key, >>>> I >>>> can fire an individual SliceQuery, but that does not look efficient to me. >>>> I >>>> do want to fire a range query. >>>> >>>> MainEntityCF { >>>> TimeUUIDKeyA: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : >>>> "Val3"] >>>> TimeUUIDKeyX: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : >>>> "Val3"] >>>> TimeUUIDKeyB: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : >>>> "Val3"] >>>> TimeUUIDKeyY: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : >>>> "Val3"] >>>> } >>>> MainEntityCF_Index { >>>> "SomeSuperColumn": [TimeUUIDKeyA:null, TimeUUIDKeyB:null, >>>> TimeUUIDKeyX:null, TimeUUIDKeyY:null] >>>> } >>>> >>>> -- >>>> Roshan >>>> Blog: http://roshandawrani.wordpress.com/ >>>> Twitter: @roshandawrani <http://twitter.com/roshandawrani> >>>> Skype: roshandawrani >>>> >>>> >> > > > -- > Roshan > Blog: http://roshandawrani.wordpress.com/ > Twitter: @roshandawrani <http://twitter.com/roshandawrani> > Skype: roshandawrani > >