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

Extend support for moving predicates into contained ORs to multikey indexes

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.4
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • Query 2017-02-13, Query 2017-03-06

      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.

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

              Created:
              Updated:
              Resolved: