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] [Commented] (OAK-2022) XPath queries with "order by" are never converted to "union"
Date Mon, 11 Aug 2014 13:03:11 GMT

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

Thomas Mueller commented on OAK-2022:

The problem with _always_ converting to "union" is that an ordered index can't be used. However,
for the queries I have seen so far, it's better to use "union" and then to sort in memory.

The best solution would be to estimate the cost of both case:
* "union" and sort in memory, and 
* no union but use the ordered index
and then to pick the solution with the lower estimated cost. However, this is quite tricky.
I will create a new issue for this.

> XPath queries with "order by" are never converted to "union"
> ------------------------------------------------------------
>                 Key: OAK-2022
>                 URL: https://issues.apache.org/jira/browse/OAK-2022
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.0
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.0.5
> XPath queries with "or" conditions are usually converted to "union", however this is
not done if there is an "order by" clause.
> Union queries do support "order by", so I don't currently see a reason for this restriction
any more.

This message was sent by Atlassian JIRA

View raw message