jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OAK-419) Query: Conditions are not pushed to "outer join" selectors
Date Fri, 02 Nov 2012 11:25:13 GMT

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

Thomas Mueller resolved OAK-419.
--------------------------------

    Resolution: Fixed

Fixed in revision 1404926
                
> Query: Conditions are not pushed to "outer join" selectors
> ----------------------------------------------------------
>
>                 Key: OAK-419
>                 URL: https://issues.apache.org/jira/browse/OAK-419
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>
> Currently the query plan for the following query
> {code}
> select * from [nt:base] as c 
> right outer join [nt:base] as p on p.id = c.p 
> where p.id is not null 
> and isdescendantnode(p, '/testRoot') 
> and isdescendantnode(c, '/testRoot')
> {code}
> is:
> {code}
> [nt:base] as [p] 
> /* traverse "/testRoot//*" 
> where (([p].[id] is not null) 
> and (isdescendantnode([p], [/testRoot]))) 
> and ([p].[id] is not null) */ 
> left outer join [nt:base] as [c] 
> /* traverse "//*" 
> where (isdescendantnode([c], [/testRoot])) 
> and ([c].[p] is not null) */ 
> on [p].[id] = [c].[p]
> {code}
> Because of that, far too many nodes are traversed on "c".
> Instead, the isdescendantnode condition should be pused to "c" so that
> it only traverses "/testRoot//*".
> The result of the query is still correct, but performance is potentially very bad (even
if there is an index).

--
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

Mime
View raw message