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

Use constant $sum optimization outside of $group

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution

      Following SERVER-77203 and SERVER-65465, $sum over a constant will use a simple sum instead of a DoubleDoubleSummation to track the sum in both classic and SBE. However, this optimization is only used in $group. This ticket tracks the work to use this optimization in other places, including: 

      • Window functions 
      • $bucketAuto (which default constructs a $sum accumulator, and does not use this optimization)
      • Anywhere that we default construct AccumulatorSum

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: