-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
This was attempted in SERVER-97864 (snapshot of testcase changes here) but failed for a few reasons, and pushed into this follow-up ticket.
- 0-sample estimates led to an assertion failure in the test. This was fixed by modifying the test so samples never returned 0. A more robust solution will be done later.
- The assertion that docsExamined is always less for CBR plans is not always true. We countered cases where classic chose a index skip scan (what we called "recursive index navigation" in bonsai), while CBR choose an index with a contiguous range. Classic results in more seeks and more works, but fewer docs examined. So we removed this assertion from the test.
- The attached repro-cbr.js
shows a case where CBR overestimates the number of keys in a index skip scan plan. This results in CBR choosing a plan with more works than the classic plan. But we are unsure whether classic's plan is actually better. We need to investigate this case before we can submit this test.
- related to
-
SERVER-97864 Support sampling of IndexBounds to estimate cardinality of IndexScanNode
-
- Closed
-