-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Right now there is a big jump between limit 1 and limit 2, even though both operations should take approximately the same amount of resources:
Enterprise test> var explain = db.foo.find().sort({a:1}).hint({$natural: 1}).limit(1).explain('executionStats'); Enterprise test> explain.executionStats.executionStages.costEstimate - explain.executionStats.executionStages.inputStage.costEstimate; 0.00009999999999976694 Enterprise test> var explain = db.foo.find().sort({a:1}).hint({$natural: 1}).limit(2).explain('executionStats'); Enterprise test> explain.executionStats.executionStages.costEstimate - explain.executionStats.executionStages.inputStage.costEstimate; 1.0000999999999998
- is duplicated by
-
SERVER-100649 Cost of $sort + $limit should depend on input size
-
- Closed
-
- is related to
-
SERVER-107356 Design workload for LIMIT node
-
- Closed
-
- related to
-
SERVER-111206 Complete TODO listed in SERVER-100648
-
- Closed
-