-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
InĀ SERVER-113679, we calibrated the cost of spilling to disk for SORT operations. However, we only calibrated for the SORT_SIMPLE and SORT_DEFAULT implementations.
When using a $sort + $limit, the specific topN algorithm is used, which theoretically could also spill to disk. We initially didn't take this into account because:
- The cost formula for topN is already complex and hard to extend for the spilling case
- Usually the $limit values are quite small, and they would have to be really huge (order of 100K) to actually cause spilling
- related to
-
SERVER-104684 Take into account memory cost for blocking plans
-
- Needs Scheduling
-
-
SERVER-113679 Take cost of SORT spilling into account
-
- In Code Review
-