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

Do not create a separate window for each init expression

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2023-09-18
    • 135

      We have implemented $avg as a combination of two accumulators, sum and count. We track the two accumulators separately and combine them at the end to compute the avg. The investigation showed that the maintenance of two separate accumulators is causing the regression. I believe the reason is that we treat each accumulator as a different window evaluating each document against the window boundaries twice.

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: