incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: 'WHERE' with several indexed columns
Date Thu, 16 Aug 2012 23:10:35 GMT
> If I have a WHERE clause in CQL with several 'AND' and each column is
> indexed, which index(es) is(are) used ?
The most selective based on the average number of columns per row 
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java

> Also is index used only with an equality operator or also with greater
equality


Cheers

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

On 17/08/2012, at 7:13 AM, A J <s5alye@gmail.com> wrote:

> Hi
> If I have a WHERE clause in CQL with several 'AND' and each column is
> indexed, which index(es) is(are) used ?
> Just the first field in the where clause or all the indexes involved
> in the clause ?
> 
> Also is index used only with an equality operator or also with greater
> than /less than comparator as well ?
> 
> Thanks.


Mime
View raw message