[
https://issues.apache.org/jira/browse/OAK-12057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072031#comment-18072031
]
Julian Reschke commented on OAK-12057:
--------------------------------------
https://github.com/apache/jackrabbit-oak/pull/2831 is another change related to
this ticket, correct? In which case the ticket should be re-opened.
> Wrong index may be selected when using LIMIT OPTION
> ---------------------------------------------------
>
> Key: OAK-12057
> URL: https://issues.apache.org/jira/browse/OAK-12057
> Project: Jackrabbit Oak
> Issue Type: Bug
> Reporter: Benjamin Habegger
> Priority: Major
>
> If two indices are available when executing a query with a LIMIT option, an
> index with more entries (and thus potentially more follow-up traversal), may
> still be selected even on with less entries follows.
> This is due to the fact that LIMIT amount (rather than the index entry count)
> is used when estimating the costPerEntry part of the cost. However it is not
> because only x will be output that only x will be considered at query time
> (as there may be filters requiring to go through more than x entries to fully
> match the query).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)