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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/11/20 15:49:35 UTC
[jira] [Commented] (OAK-1116) Query: use indexes for queries with
"or" conditions
[ https://issues.apache.org/jira/browse/OAK-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827717#comment-13827717 ]
Alex Parvulescu commented on OAK-1116:
--------------------------------------
I'm pretty sure this broke down OAK-882 so instead of having a 'in' we now have a union even for simple 'or' conditions:
{noformat}
//*[(@pid = 'v1' or @pid = 'v2') ]
{noformat}
turns into this guy
{noformat}
select [jcr:path], [jcr:score], * from [nt:base] as a where [pid] = 'v1' union select [jcr:path], [jcr:score], * from [nt:base] as a where [pid] = 'v2' /* xpath: //*[(@pid = 'v1' or @pid = 'v2') ] */
{noformat}
> Query: use indexes for queries with "or" conditions
> ---------------------------------------------------
>
> Key: OAK-1116
> URL: https://issues.apache.org/jira/browse/OAK-1116
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 0.12
>
>
> Currently, queries of the form "x = 1 or y = 2" don't use an index, which is a performance problem.
> There are multiple ways to solve the problem, one is to convert the query to a "union".
--
This message was sent by Atlassian JIRA
(v6.1#6144)