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

Davide Giannella updated OAK-5980:
----------------------------------
    Fix Version/s:     (was: 1.12.0)

> Bad Join Query Plan Used
> ------------------------
>
>                 Key: OAK-5980
>                 URL: https://issues.apache.org/jira/browse/OAK-5980
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>             Fix For: 1.14.0
>
>
> For a join query, where selectors are joined over ischildnode but also can 
> use an index,
> the selectors sometimes use the index instead of the much less
> expensive parent join. Example:
> {noformat}
> select [a].* from [nt:unstructured] as [a]
> inner join [nt:unstructured] as [b] on ischildnode([b], [a]) 
> inner join [nt:unstructured] as [c] on ischildnode([c], [b]) 
> inner join [nt:unstructured] as [d] on ischildnode([d], [c]) 
> inner join [nt:unstructured] as [e] on ischildnode([e], [d]) 
> where [a].[classname] = 'letter' 
> and isdescendantnode([a], '/content') 
> and [c].[classname] = 'chapter'         
> and localname([b]) = 'chapters' 
> and [e].[classname] = 'list' 
> and localname([d]) = 'lists' 
> and [e].[path] = cast('/content/abc' as path)
> {noformat}
> The order of selectors is sometimes wrong (not e, d, c, b, a), but
> more importantly, selectors c and a use the index on className.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to