[SERVER-83248] [CQF] Log each cardinality estimation Created: 14/Nov/23  Updated: 08/Dec/23  Resolved: 08/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: David Percy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QO 2023-11-27, QO 2023-12-11
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 08/Dec/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-83248 Log each deriveCE() call

Also add a separate log component for query/optimizer/ and query/ce/,
and fix an incorrect comment.

GitOrigin-RevId: 0e4d87290bf69d458befe29882294de24e38ec88
Branch: master
https://github.com/mongodb/mongo/commit/23c345700c6912ca3b9a75aec28fc87e735795db

Comment by David Percy [ 07/Dec/23 ]

Updated the description to reflect that we're not updating the default log verbosity of any test suites in this ticket.

Generated at Thu Feb 08 06:51:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.