I would partition either with cassandra's partitioning or PlayOrm partitioning 
and query like so

Where beginOfMonth=xxxxx and startDate>"X" and counter > "Y".  This only 
returns stuff after X in that partition though so you may need to run multiple 
queries like this and if you have billions of rows it could take some 
time….instead you may want startData > X and startDate < Z such that Z and X 
are in the same month or if they span 2-3 partitions, then just run the 2-3 
queries.  I don't know enough detail on your use case to know if this works for 
you though.

Dean

From: aaron morton <aa...@thelastpickle.com<mailto:aa...@thelastpickle.com>>
Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Date: Friday, April 5, 2013 10:59 AM
To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" 
<user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Re: Data Model and Query


Whats the recommendation on querying a data model like  StartDate > “X” and 
counter > “Y” .

it's not possible.

If you are using secondary indexes you have to have an equals clause in the 
statement.

Cheers

-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 4/04/2013, at 6:53 AM, shubham srivastava 
<shubha...@gmail.com<mailto:shubha...@gmail.com>> wrote:


Hi,



Whats the recommendation on querying a data model like  StartDate > “X” and 
counter > “Y” . Its kind of range queries across multiple columns and key.

I have the flexibility for modelling the data for the above query accordingly.



Regards,

Shubham

Reply via email to