-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
QE 2021-10-18
$group accumulators keep accumulating values per each value entering a group. While accumulating, the accumulator implementation may keep allocating a new accumulated value to accumulate the new value and the previous accumulated value.
If the accumulated value is primitive type, this behavior may be ok but if the accumulated value happen to be a complex type like Array, Object, or ArraySet, then this behavior is highly likely to hurt $group performance in SBE.
$sum is such an example.
- related to
-
SERVER-60289 [SBE] Improve performance of $mergeObjects when used with $group
- Closed