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

Optimizer should consider predicate with "$in" operator having a single argument to be equivalent to the equality operator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.5
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • Query 12 (04/04/16), Query 13 (04/22/16)
    • 0

      Query shapes like {a: { "$in": [1]}, b:1, c: { "$in": [1,2,3]}} and {a: 1, b:1, c: { "$in": [1,2,3]}} are cached separately while they are equivalent.

      It may not be a big problem, but mongod could be smart enough to recognize this.

            Assignee:
            benjamin.murphy Benjamin Murphy
            Reporter:
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: