-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
With collection sizes >10K , inequalities and $nor, that is, things that produce two index ranges result in an error:
db.foo.drop(); docs = []; for (let i = 1; i <= 10000; i++) { docs.push({a:i}); } db.foo.insertMany(docs); db.foo.createIndex({a:1}); db.foo.find({"a":{"$ne":17}}); MongoServerError[Location9274202]: 10000 must be <= 10000 to produce selectivity
Another statement that produced the same error from a different dataset:
Enterprise test> db.plan_stability.aggregate([{"$match":{"$nor":[{"i_idx":{"$eq":16}}]}}]) MongoServerError[Location9274202]: 100000 must be <= 100000 to produce selectivity