push limit down into index scan for sort + limit queries

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      index {a:1,b:1}
      find( {a:{$gte:2,$lte:4}} ).sort( {b:1} ).limit(5)

      There is a missing optimization for the query above. The query engine could scan only the first 5 values of b for each value of a.

      See SERVER-3122 for initial description and SERVER-3310 for a related case.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Aaron Staple (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: