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

$in queries perform linearly to the length of the input array

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Performance, Querying
    • Labels:
      None

      Description

      If you do a $in or $nin query and give it a large array as input, then for each document that needs to be checked to see if it matches the query, it compares the value in that document for that field to each element in the input array. It would be much more performant if there was a single check to see if the value in the document is contained in a hash set of the values passed to the $in query.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-query-execution Backlog - Query Execution
              Reporter:
              spencer Spencer Brody (Inactive)
              Participants:
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated: