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

[CQF] Log each cardinality estimation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • QO 2023-11-27, QO 2023-12-11

      During optimization, OptPhaseManager makes many calls into the CardinalityEstimator interface for different predicates. The results can be nondeterministic (based on sampling), and the CE method can depend on many configuration options.

      When debugging from the mongo shell, we often want to know why the wrong plan was chosen, or why it varies from run to run. The answer has to do with how the CE varies from run to run.

      Let's add a log line on every CE call that includes:

      • the predicate that was estimated
      • the estimate
      • the CE method

      This should be at a low severity, not logged by default in a production server, but could be enabled by default in CQF tests later.

            Assignee:
            david.percy@mongodb.com David Percy
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: