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/08/11 15:03:11 UTC
[jira] [Commented] (OAK-2022) XPath queries with "order by" are
never converted to "union"
[ 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
(v6.2#6252)