You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Samya Maiti <sa...@gmail.com> on 2015/09/03 20:44:20 UTC

Querying on multiple columns

Hi All,

I have a use-case where in I want to execute query on my cassandra table with different where clauses.

Two approaches know to me is :-
Creating secondary index
But to my understanding, query on secondary index will be slow.
Creating multiple tables with same data but different primary key.
This option has many consequences as lot of things needs to be taken care of while writing the data.

Please let me know if a better solution is available. I am using 2.1.5 version.

Regards,
Sam

Re: Querying on multiple columns

Posted by Ryan Svihla <rs...@foundev.pro>.
That is the state of data modeling with 2.1 and it's worked quite well for
a lot of people (especially for those using batches or streaming to
maintain the different views of the same data).

However, you should be interested in the upcoming Materialized Views in 3.0
http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views



On Thu, Sep 3, 2015 at 1:44 PM, Samya Maiti <sa...@gmail.com>
wrote:

> Hi All,
>
> I have a use-case where in I want to execute query on my cassandra table
> with different where clauses.
>
> Two approaches know to me is :-
>
>    - Creating secondary index
>       - But to my understanding, query on secondary index will be slow.
>    - Creating multiple tables with same data but different primary key.
>       - This option has many consequences as lot of things needs to be
>       taken care of while writing the data.
>
>
> Please let me know if a better solution is available. I am using 2.1.5
> version.
>
> Regards,
> Sam
>



-- 

Thanks,
Ryan Svihla