SERVER-139493ClosedWon't Do

CBR limit propagation floors child limit shares, costing OR/AND subtrees as free under small limits

h2. Summary {{CardinalityEstimator::propagateLimit}} ({{src/mongo/db/query/compiler/optimizer/cost_based_ranker/cardinality_estimator.cpp}}) splits a limit between the children of OR, AND_HASH, AND_SORTED and SORT_MERGE in proportion to their cardinality estimates, and passes a FETCH's limit on to its child. Both use {{CardinalityEstimate::toCount()}}, which floors: Any child whose proportional share is below one row is therefore given a limit of 0. That sets its output estimate to 0 and scales

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.