[ 
https://issues.apache.org/jira/browse/OAK-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller resolved OAK-530.
--------------------------------

    Resolution: Fixed
    
> Optimization for xpath queries of type "/jcr:root//*[x/@y]"
> -----------------------------------------------------------
>
>                 Key: OAK-530
>                 URL: https://issues.apache.org/jira/browse/OAK-530
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>
> Currently, the xpath query {{/jcr:root//*[x/@y]}} is converted to:
> {code}
> select [jcr:path], [jcr:score], * from [nt:base] as a
> where [x/y] is not null
> and isdescendantnode(a, '/')
> {code}
> This works well (the query is executed and returns the correct result as far 
> as I understand), but currently no index is used, even if there is an index 
> for the property {{y}}.
> To speed up executing such queries, we could
> (a) change the converter to convert to a different SQL-2 query so that an 
> index is used, or
> (b) implement a special 'virtual' index that internally uses a property 
> index, and then returns the parent nodes instead of the node that contain the 
> property.
> Currently, I think (b) is simpler, so I will try that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to