-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Write Ops
-
Labels:None
-
Query Execution
-
(copied to CRM)
Currently the sort used for $push with $sort will extract sort keys in the sort comparator, once for each comparison. The key extraction is expensive and can be reduced by extracting prior to the sort.
We should also consider adding optimization for insertion into an already sorted array.
- is related to
-
SERVER-27842 Replace BSONElement.fieldName() calls with BSONElement.fieldNameStringData() in dotted_path_support.cpp
- Closed