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

Do not create a separate window for each init expression

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2023-09-18
    • 135

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: