-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
ALL
-
The estimates for inequality predicates over array fields are inaccurate, sometimes overestimating by a factor of 10x
Enterprise test> db.foo.find({a: {$gt: 40}}).count(); 8 Enterprise test> db.foo.find({a: {$gt: 40}}).explain().queryPlanner.winningPlan.cardinalityEstimate; 18.911000191707124
I think the reason is that one document can contribute multiple entries into the histogram, thus inflating all estimates involving inequalities.
- is related to
-
SERVER-98085 Reflect array semantics in CE
- Open