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

Progressive elimination of candidate plans during plan ranking trial period

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Querying
    • Labels:

      Description

      The MongoDB query optimizer uses an empirical plan ranking strategy in which candidate plans are executed in order to determine which is likely to be most efficient. The trial period ends when either

      1. a plan executes the entire query,
      2. a plan generates an entire batch of results, or
      3. some large maximum amount of work has been done.

      In the third case, it is possible that the trial period will be expensive, since there could be n candidate plans each performing a significant amount of IO or database operations.

      If the candidates execute for a long time—say, 10,000 units of work—without hitting end condition #1 or end condition #2, we should pause and eliminate any candidate plan that has already proven to be suboptimal. This same progressive refinement strategy could be done every w units of work in order to minimize the cost of the plan selection trial period.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-query-optimization Backlog - Query Optimization
              Reporter:
              david.storch David Storch
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated: