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

$in on first compound key element and limit efficiency

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.1
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None

      If you have an index on ( a , b ) and do a query like find( { a :

      { $in : [ ... }

      } ).sort(

      { b : 1 }

      ).limit(10)
      an easy optimization is limiting the results for each $in element to the limit.

            Assignee:
            aaron Aaron Staple
            Reporter:
            eliot Eliot Horowitz (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: