-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
If a FetchNode has no filter, then its estimate is equal to it's child estimate. In this case we can avoid estimating the child in this code block:
if (node->children[0]->getType() == STAGE_IXSCAN && static_cast<const IndexScanNode*>(node->children[0].get())->filter == nullptr && // TODO SERVER-98577: Remove this restriction _rankerMode == QueryPlanRankerModeEnum::kSamplingCE) {
Thanks milena.ivanova@mongodb.com for discovering the redundancy.
This makes me think that we need cardinality and cost estimation counters which we could assert on that a certain query took no more than that many estimations.
- related to
-
SERVER-98577 Identify and sample Fetch --> Index Scan plan fragments
-
- Needs Scheduling
-