Use constant $sum optimization outside of $group

XMLWordPrintableJSON

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

      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:
            Unassigned
            Reporter:
            Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: