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

when creating new index, use existing index if possible to avoid collection scan

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Storage Execution
    • Execution Team 2020-10-05

      A user pointed out that if there is an index on a:1, b:1  and they specify they want to create a new index b:1 with partialFilterExpression:{a:10} (or any other filter on a then index build could scan the existing index and build new index much faster.

      Common use case that can benefit from this may also be a case where there exists an index on a:1, b:1, c:1 and user wants to replace it with index on just a:1, b:1 which again can be build (hopefully) faster from existing index than collection scan.

            Assignee:
            Unassigned Unassigned
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: