You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2014/02/05 13:58:09 UTC

[jira] [Commented] (OAK-1389) Query: an index is used even where traversing is faster

    [ https://issues.apache.org/jira/browse/OAK-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13892069#comment-13892069 ] 

Thomas Mueller commented on OAK-1389:
-------------------------------------

Revision 1564752 (WIP)

> Query: an index is used even where traversing is faster
> -------------------------------------------------------
>
>                 Key: OAK-1389
>                 URL: https://issues.apache.org/jira/browse/OAK-1389
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>
> Currently, for queries that can use an index, the index is always preferred over traversing over the nodes. For joins, sometimes is much faster to traverse, specially the exact path is known. Example:
> {noformat}
> /jcr:root/testroot/node[@jcr:uuid]
> {noformat}
> This query will use the index on "jcr:uuid", and traverse over all nodes with the property "jcr:uuid", even thought in fact only one node would need to be read when using the TraversingIndex.
> The problems are: Currently, the TraversingIndex is not even asked to estimate the cost. Also, the cost estimation of the TraversingIndex is incorrect for such cases. 
> We will also need to verify and fix the cost estimation of the other indexes (for example the PropertyIndex) conforms the QueryIndex API (getCost is supposed to return the estimated number of entries to traverse).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)