Cassandra Performing Queries Efficiently
Look into how Cassandra tries to perform queries efficiently.
In Cassandra, performing a query that does not use the primary key is guaranteed to be inefficient because it will need to perform a full table scan querying all the cluster nodes.
Methods to perform queries efficiently
Two alternatives can be used to solve the above problem:
- Secondary indexes
- Materialized views.
Secondary indexes
A secondary index can be defined on some columns of a table. This means each node will index this table locally using the specified columns. A query based on these columns will still need to ask ...