cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Bernardi <>
Subject Re: Creating counter columns in cassandra
Date Sun, 29 Jul 2012 09:59:32 GMT
On Sun, Jul 29, 2012 at 9:30 AM, Abhijit Chanda
<> wrote:
> There should be at least one "=" (equals) in the WHERE case on key or
> secondary index column, this is the Cassandra limitation.

Yep, it's still there (see validateFilterClauses from line 531):

It's not probably going to change anytime soon (or later, probably ;-)
), secondary indexes are still CFs underneath:

>From that message you also get an hint on how to proceed in this situation:
1) Add a "fake" equality condition to the query;
2) Go for a range scan, which is more efficient than the hack above.

Depending on the speed than you need on the writing side compared to
the speed required on the reading side, you might also consider
keeping an ad-hoc index of the counter columns with the counter
greater than your threshold, but it's surely requiring more
housekeeping on your side.


View raw message