[ https://issues.apache.org/jira/browse/OAK-4887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16255157#comment-16255157 ]
Thomas Mueller commented on OAK-4887: ------------------------------------- Even without the patch, with current trunk, the right index is used (if there are two indexes as described above). This is because the Lucene index returns a lower cost if "order by" of that property is supported by the index (I think each indexed property reduces the cost of the index). However, with the patch, the limit is used correctly to adjust the cost. > Query cost estimation: ordering by an unindexed property not reflected > ---------------------------------------------------------------------- > > Key: OAK-4887 > URL: https://issues.apache.org/jira/browse/OAK-4887 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: query > Affects Versions: 1.4.2 > Reporter: Alexander Klimetschek > Assignee: Thomas Mueller > Fix For: 1.8, 1.7.12 > > > A query that orders by an unindexed property seems to have no effect on the > cost estimation, compared to the same query without the order by, although it > has a big impact on the execution performance for larger results/indexes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)