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

Davide Giannella edited comment on OAK-1617 at 10/14/15 3:04 PM:
-----------------------------------------------------------------

in [^OAK-1617-3.patch] the last patch which will address OAK-2660 as
well.

To summarise.

The feature is currently disabled. To enable it provide the flag
{{-Doak.query.sql2optimisation}}.

The {{Query}} now exposes a {{Query#getCostOverhead()}} which can be
used to instruct the query engine around behaviours on choosing one
version rather the other: original SQL2 vs Optimised/Union.

If no optimisations are available it will pick the original statement,
otherwise it will analyse (prepare and cost) both the queries:
original and union and pick the cheapest.

The changes currently support only one optimisation query off the
original statement but with a quick change it will be possible to
extend the concept to be able to provide multiple optimisations which
can then be analysed to see what is the cheapest.

All ITs and UTs are currently passing on my local with and without the
feature enabled.

[~tmueller] could you please review?



was (Author: edivad):
in [^OAK-1617-3.patch] the last patch which will address OAK-2660 as
well.

To summarise.

The feature is currently disabled. To enable it provide the flag
{{-Doak.query.sql2optimisation}}.

The {{Query}} now exposes a {{Query#getCostOverhead()}} which can be
used to instruct the query engine around behaviours on choosing one
version rather the other: original SQL2 vs Optimised/Union.

If no optimisations are available it will pick the original statement,
otherwise it will analyse (prepare and cost) both the queries:
original and union and pick the cheapest.

The changes currently support only one optimisation query off the
original statement but with a quick change it will be possible to
extend the concept to be able to provide multiple optimisations which
can then be analysed to see what is the cheapest.

[~tmueller] could you please review?


> Automatically convert "or" queries to "union" for SQL-2
> -------------------------------------------------------
>
>                 Key: OAK-1617
>                 URL: https://issues.apache.org/jira/browse/OAK-1617
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Davide Giannella
>            Priority: Minor
>             Fix For: 1.3.9
>
>         Attachments: OAK-1617-1.patch, OAK-1617-2.patch, OAK-1617-3.patch
>
>
> XPath queries that contain "or" conditions are automatically converted to 
> "union" SQL-2 queries. However, SQL-2 queries that contain "or" conditions 
> are not (yet).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to