Composite Columns compare each part in turn, so the values are ordered as you've shown them.
However the rows are not ordered according to key value. They are ordered using the random token generated by the partitioner see http://wiki.apache.org/cassandra/FAQ#range_rp > What is the real advantage compared to super column families? They are faster. Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 29/05/2012, at 10:08 PM, Cyril Auburtin wrote: > How is it done in Cassandra to be able to range query on a composite key? > > "key1" => (A:A:C), (A:B:C), (A:C:C), (A:D:C), (B,A,C) > > like get_range ("key1", start_column=(A,"), end_column=(A, C)); will return [ > (A:B:C), (A:C:C) ] (in pycassa) > > I mean does the composite implementation add much overhead to make it work? > Does it need to add other Column families, to be able to range query between > composites simple keys (first, second and third part of the composite)? > > What is the real advantage compared to super column families? > > "key1" => A: (A,C), (B,C), (C,C), (D,C) , B: (A,C) > > thx
