I am confused after reading about index in DataStax documents at following 2 places:
Place1: How are indexes stored and updated?
https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlIndexInternals.html If a secondary index is used in a query that is not restricted to a particular partition key, the query will have prohibitive read latency because all nodes will be queried. A query with these parameters is only allowed if the query option
ALLOW FILTERINGis used. This option is not appropriate for production environments
Place2: Using a secondary index
https://docs.datastax.com/en/cql-oss/3.3/cql/cql_using/useSecondaryIndex.html cqlsh> CREATE INDEX rrank ON cycling.rank_by_year_and_name (rank); SELECT * FROM cycling.rank_by_year_and_name WHERE rank = 1;
Here on this page, there are of examples about executing a query with only secondary index attribute and doesn't include partition key.
Main question: Can i use secondary index in a query without using partition key fields ?
Side Question: Which explanation is correct (place1 or place2) ?