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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.5
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Query 12 (04/04/16), Query 13 (04/22/16)
    • Linked BF Score:
      0

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benjamin.murphy Benjamin Murphy
              Reporter:
              dmitry.ryabtsev Dmitry Ryabtsev
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: