[SERVER-68006] Investigate plan changes due to changes in heuristic estimation Created: 13/Jul/22  Updated: 29/Oct/23  Resolved: 12/Aug/22

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

Type: Task Priority: Major - P3
Reporter: Timour Katchaounov Assignee: Svilen Mihaylov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QO 2022-08-08, QO 2022-08-22
Participants:

 Description   

The implementation of a more detailed heuristic CE in SERVER-67166 result in different cardinality estimates than before this task. As a result several plans change. On two occasions the changed plans cause an assertion which is most likely an optimizer bug.

This bug should investigate the following plan changes in src/mongo/db/query/optimizer/physical_rewriter_optimizer_test.cpp:

  • FilterIndexing4 - changes from covering to non-covering plan with heuristic CE - why?
  • FilterIndexingVariable - same
  • IndexResidualReq2 - the Filter node is moved to just before the Seek. Why? Is this still testing the same functionality?
  • IndexPartitioning, IndexPartitioning1 - results in an failed assert when cardinality estimates change. The assert is in physical_rewriter.cpp: "Must optimize successfully if found compatible properties!"
  • IndexPartitioning1: The interesting thing is that it doesn't fail on each test run, but sometimes, which makes one think the failure depends on rounding errors of cost/cardinality estimates, which in turn results in different sub-plans.

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