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

Explain (and logs) should indicate when query planning thresholds are encountered

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2020-11-30, Query 2020-12-14

      Description

      There are a handful of parameters that influence the plan generation process.  Two examples would be internalQueryEnumerationMaxOrSolutions and internalQueryMaxScansToExplode.  When encountered, these modify the set of plans that are available for selection and can have an important impact on the overall efficiency of the query (eg SERVER-36393).

      In some situations, it is relatively easy to determine that such a threshold was encountered during planning with a high degree of confidence.  For example if the query shape is a (singled) contained $or and there are precisely ten plans that contain a "OR" stage then it is very likely that the deployment is using the default value of 10 for the internalQueryEnumerationMaxOrSolutions parameter and that the threshold was encountered during the planning process.  However it very quickly becomes difficult or impossible to definitively determine that these various thresholds were reached in an arbitrary situation.  

      We should report when the planner encounters these situations in explain output.  It is also worth considering adding this to the log output as well (verbose or otherwise).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ted.tuckman Ted Tuckman
              Reporter:
              christopher.harris Christopher Harris
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: