-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
QO 2025-01-20
This expression is nothing fancy and valid:
Enterprise test> db.foo.find({$and: [{ $or: [{ a: 0 }, { a: 1 }] }, { $or: [{ a: { $lt: 90 } }] }]}); MongoServerError[HistogramCEFailure]: encountered child of AndMatchExpression that was not sargable (ComparisonMatchExpression): { a: { $in: [ 0, 1 ] } }