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

Progressive elimination of candidate plans during plan ranking trial period

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • Query Optimization

    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

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            22 Start watching this issue

            Dates

              Created:
              Updated: