> Is there any way to take rows with first key's part equals AA and second more 
> or equal BB?
Do a range slice starting with (AA:BB:) and without a finish row. 
Remember that range slices (of rows) are not in order when using the Random 
Partitioner.So you will also get back rows that have a lower key.

> Can someone show query that will fetch all rows match to this condition:  ( 
> AA:(part 2>= BB)  ) or ( key == (BB:CC) )
You have to use the technique above. But the rows are not returned in key order 
when using the RandomPartitioner. So if this is an important query for you 
consider changing the Data Model to support it. 

Cheers

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 20/03/2012, at 2:45 AM, Stephen Pope wrote:

> Those are going to have to be separate queries, since the first is a slice, 
> and the second is a fetch.
>  
> Cheers,
> Steve
>  
> From: Michael Cherkasov [mailto:michael.cherka...@gmail.com] 
> Sent: Monday, March 19, 2012 9:41 AM
> To: user@cassandra.apache.org
> Subject: Re: Get few rows by composite key.
>  
> Also one more question:
> Can someone show query that will fetch all rows match to this condition:  ( 
> AA:(part 2>= BB)  ) or ( key == (BB:CC) )
> 
> 2012/3/19 Michael Cherkasov <michael.cherka...@gmail.com>
> Hello, 
> Assume that we have table like this one:
>  
> Key:        Columns names:
> AA:AA     1:A 1:B 1:C 2:A 2:C  
> AA:BB     1:C 2:A 2:C
> AA:CC     2:A 2:C
> AA:DD     1:A 1:B 1:C
> BB:AA     1:A 1:B 2:C
> BB:BB     1:A 1:B 1:C 2:C
> BB:CC     1:A  2:A 2:C
> BB:DD     1:A  1:C 2:A 2:C
>  
> Is there any way to take rows with first key's part equals AA and second more 
> or equal BB?
> I'm interesting about Hector code.

Reply via email to