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

$in on first compound key element and limit efficiency

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Querying
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: