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

$in on first compound key element and limit efficiency

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.1.1
    • Querying
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: