Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60481

Fix perf issue with $sum accumulator in $group pushed down to SBE

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • 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 ArrayObject, or ArraySet, then this behavior is highly likely to hurt $group performance in SBE.

      $sum is such an example.

            Assignee:
            martin.neupauer@mongodb.com Martin Neupauer
            Reporter:
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: