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

Improve index pruning to consider two indexes with same exercised prefixes in different order

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

      Consider a query

      {a: 1, b: 2, c: {$gt: 5}}
      

      And indexes

      {a: 1, b: 1, c: 1}
      {b: 1, a: 1, c: 1}

      Currently the index pruning introduced in SERVER-82677 does not dedup these indexes because the exercised prefix (prefix of fields which have non-open bounds) are different.

      In the case when the indexes have the same set of exercised fields with the same bounds and there is no sort being provided, then we should be able to prune one of the indexes.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: