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

$in on first compound key element and limit efficiency

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.1.1
    • None
    • 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

        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: