Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2618

Improve performance of queries with ORDER BY and multiple OR filters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.15, 1.3.1, 1.4
    • query

    Description

      When multiple OR constraints are specified in the XPATH query, itis broken up into union of multiple clauses. If query includes an order by clause, the sorting in this case is done by traversing the result set in memory leading to slow query performance.

      Possible improvements could include:

      • For indexes which can support multiple filters (like lucene, solr) such queries should be efficient and the query engine can pass-thru the query as is.
        • Possibly also needed for other cases also. So, we can have some sort of capability advertiser for indexes which can hint the query engine

      and/or

      • Batched merging of the sorted iterators returned for the multiple union queries (possible externally).

      Attachments

        Activity

          People

            amitjain Amit Jain
            amitjain Amit Jain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: