Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
None
-
Fully Compatible
-
QO 2022-08-08, QO 2022-08-22
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.