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-7390) QueryResult.getSize() can be slow for many "or" or "union" conditions
Date Thu, 05 Apr 2018 09:24:00 GMT

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

Thomas Mueller resolved OAK-7390.
    Resolution: Fixed

Documented in the XPath and SQL-2 grammer, e.g. http://jackrabbit.apache.org/oak/docs/query/grammar-xpath.html

> QueryResult.getSize() can be slow for many "or" or "union" conditions
> ---------------------------------------------------------------------
>                 Key: OAK-7390
>                 URL: https://issues.apache.org/jira/browse/OAK-7390
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>             Fix For: 1.10
> For queries with many union conditions, the "fast" getSize method can actually be slower
than iterating over the result. 
> The reason is, the number of index calls grows exponential with regards to number of
subqueries: (3x + x^2) / 2, where x is the number of subqueries. For this to have a measurable
affect, the number of subqueries needs to be large (more than 100), and the index needs to
be slow.

This message was sent by Atlassian JIRA

View raw message