Benjamin Habegger created OAK-12057:
---------------------------------------
Summary: 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
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)