[
https://issues.apache.org/jira/browse/CASSANDRA-11617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15249818#comment-15249818
]
Sylvain Lebresne commented on CASSANDRA-11617:
----------------------------------------------
Do we really want to carry on with that arbitrary and illogical behavior (only
using partition range reads for index queries that is)? I mean, that was
certainly how it was pre-3.0 but to the best of my knowledge there was no good
reason for that outside of technical debt (more precisely index condition only
shipped with range queries previously and we've been too lazy to change that so
far). The new code in 3.0 is perfectly fine relying on single partition command
when the query is single partition based however and it's really the way it
should be (it's more intuitive and it's more efficient) so I'm actually quite
strongly in favor of moving to that ultimately. Note that I can believe this
will require a slight adaptation for existing custom index implementations but
it's not like 3.0 didn't required a lot of change already.
I'll also note that internal 2ndary index query do still always use partition
range command even for single partition queries but that's only because I've
preferred leaving this change for after CASSANDRA-8099 (which was making enough
change as it is), but it's probably high time to change that (and happy to use
this ticket for that if we want).
> The presence of custom index expressions doesn't set the indexing flag in
> StatementRestrictions
> -----------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-11617
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11617
> Project: Cassandra
> Issue Type: Bug
> Components: CQL
> Reporter: Sam Tunnicliffe
> Assignee: Sam Tunnicliffe
> Fix For: 3.0.x, 3.x
>
>
> This can lead to queries with index expressions being executed as single
> partition rather than partition range reads, which should always be the case
> for index queries, even when the partition key is restricted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)