Reputation: 39
I would like to use Cassandra for storing data with more than 500 columns in one row for my application which will perform quite a lot of WHERE queries. Can I perform WHERE CLAUSE without using secondary index since it's impractical to create secondary index for all columns? Or how to model the data in a better way.
Upvotes: 0
Views: 81
Reputation: 4349
Cassandra is about speed and performance, it does not support joins and WHERE clause is disabled by default on non primary key columns since this filtering has a negative effect on performance.
Cassandra modeling rules are not the same as relational databases ones. In Cassandra you should model your tables according to your queries not according to your entities and relationships.
The key principles when modeling data in Cassandra are:
The steps to model your data in cassandra are:
I know this may have no sense for you. It is just to tell you that Cassandra modeling is different from Relational databases.
To learn more about this topic and get a solid understanding, here is a COMPLETE FREE COURSE provided by datastax company about cassandra data modeling.
Upvotes: 1