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

use plan ordering when reporting "winning" plan at the top of explain

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL

    Description

      In cases where there is no "winning" query plan, one query plan with the highest match count is reported in the explain output (see discussion in SERVER-4150). However, in cases where some query plans are ordered and others are unordered, and a small limit is applied, this may result in an unordered plan being incorrectly reported at the top of explain when the results actually came from an ordered plan. We should take plan ordering and limit completion into account when choosing a plan to report at the top of explain (ExplainClauseInfo::virtualPickedPlan).

      Attachments

        Activity

          People

            benety.goh@mongodb.com Benety Goh
            aaron Aaron Staple
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: