You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by anuja jain <an...@gmail.com> on 2015/10/08 11:37:41 UTC

Secondary indices on boolean type columns

I have two questions,
1. Does creating secondary index on low cardinality columns like of boolean
type helps in read performance any ways? Because there will be only two
values( true and false ) for that column in index table.

2. Should secondary indexes be created on clustering columns even if these
columns are not frequently used in where clause of a query?

Re: Secondary indices on boolean type columns

Posted by Robert Coli <rc...@eventbrite.com>.
On Thu, Oct 8, 2015 at 2:37 AM, anuja jain <an...@gmail.com> wrote:

> 1. Does creating secondary index on low cardinality columns like of
> boolean type helps in read performance any ways?
>
No.


> 2. Should secondary indexes be created on clustering columns even if these
> columns are not frequently used in where clause of a query?
>
Secondary Indexes should generally not be used, IMO.

=Rob

Re: Secondary indices on boolean type columns

Posted by Jack Krupansky <ja...@gmail.com>.
Secondary indexes are not a recommended best practice. Better choices:

1. The new 3.0 materialized views.
2. Manual query tables
3. DSE Search/Solr
4a. Stratio Lucene indexing
4b. TupleJump Stargate Lucene indexing

In any case, low cardinality is not recommended for indexes. The goal is
that a query on the index will return a modest to moderate number of rows
from a single node. Very high cardinality is also not recommended since
indexes are local, so fanout is required if the coordinator node cannot
supply the desired row limit.

-- Jack Krupansky

On Thu, Oct 8, 2015 at 5:37 AM, anuja jain <an...@gmail.com> wrote:

> I have two questions,
> 1. Does creating secondary index on low cardinality columns like of
> boolean type helps in read performance any ways? Because there will be only
> two values( true and false ) for that column in index table.
>
> 2. Should secondary indexes be created on clustering columns even if these
> columns are not frequently used in where clause of a query?
>