Some of your are probably familiar with work in the DS fork to improve the
selection of indexes for SAI queries in
https://github.com/datastax/cassandra/commit/eeb33dd62b9b74ecf818a263fd73dbe6714b0df0#diff-2830028723b7f4af5ec7450fae2c206aeefa5a2c3455eff6f4a0734a85cb5424
.

While I'm eagerly anticipating working on that in the new year, I'm also
wondering whether we think some simple CQL extensions to manually control
index selection would be helpful. Maxwell proposed this a while back
in CASSANDRA-18112, and I'd like to propose a syntax:


ex. Do not use the specified index during the query.

SELECT ... FROM ... WHERE ... WITHOUT INDEX <ks.idx>

This could be helpful for intersection queries where one of the provided
clauses is not very selective and could simply be handled via
post-filtering.

ex. Require the specified index to be used.

SELECT ... FROM ... WHERE ... WITH INDEX <ks.idx>

This could be helpful in scenarios where multiple indexes exist on a column
and was the primary motivation for CASSANDRA-18112.

Thoughts?

Reply via email to