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

Add index name to explain stats for query stages that use indexes

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc3
    • Affects Version/s: None
    • Component/s: Diagnostics, Querying
    • Labels:
      None

      With the new explain functionality, there is currently no way to determine the name of the index used (you would need to look at the keypattern field and getIndexes() for the collection).

      A number of users rely on the index name for debugging queries (e.g. I created an index named "MY_INDEX", I want to ensure it is being used by a query).

      There doesn't seem to be much overhead or downside to adding the index name to the IXSCAN stage, and preserves the functionality some users are expecting.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            jason.zucchetto Jason Zucchetto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: