-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Query Planning
-
None
-
Query Optimization
-
QO 2024-12-23
Those types of plans do not have any costs attached to them
coll = db.foo; coll.drop();for (let i = 0; i < 1000; i++) { coll.insertMany([{a: i}]); } db.runCommand({analyze: "foo", key: "_id"}); // EXPRESS_SCAN query db.foo.aggregate([{$match:{_id: 1}}]).explain().queryPlanner; // COUNT_SCAN query coll.explain().aggregate([{$match: {a: 2}}, {$count: "count"}]);