Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27904

Extend support for moving predicates into contained ORs to multikey indexes

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.4
    • Querying
    • None
    • Fully Compatible
    • Query 2017-02-13, Query 2017-03-06

    Description

      SERVER-13732 entails moving a predicate into a contained OR to tighten index bounds, i.e. if we have indexes {b: 1, a: 1} and {c: 1, a: 1}, the query

      db.coll.find({$and: [{a: 2}, {$or: [{b: 3}, {c: 4}]}]})
      

      should have the plan

      OR (
      IXSCAN {b:[[3, 3]],a:[[2, 2]]}
      IXSCAN {c:[[4, 4]],a:[[2, 2]]}
      )
      

      This ticket requires the above plan to be generated even if the index is multikey.

      Attachments

        Issue Links

          Activity

            People

              tess.avitabile@mongodb.com Tess Avitabile (Inactive)
              tess.avitabile@mongodb.com Tess Avitabile (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: