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

For unique indexes avoid consulting indexes other than property index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.12, 1.6.0
    • query

    Description

      Currently for queries involving unique index like

      SELECT * FROM [nt:base] WHERE [jcr:uuid] = $id
      

      QueryEngine would start consulting all types of index in order of minimum cost. Where minimum cost are

      • PropertyIndex - 2.0
      • LucenePropertyIndex - 2.1

      For such queries in case of match property index returns a cost of (base) 2 + (count) 1 = 3 due to which QE has to consult Lucene index also. Given such queries a very frequent it would be better to avoid consulting Lucene index as that adds unnecessary overhead

      Attachments

        1. OAK-4904-v1.patch
          7 kB
          Chetan Mehrotra
        2. OAK-4904-v2.patch
          8 kB
          Thomas Mueller

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: