aggregation: optimize $group to take advantage of sorted sequences

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • Query 10 (02/22/16), Query 11 (03/14/16), Query 12 (04/04/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If the input to a $group is sorted by the _id, then only one bucket needs to be maintained at a time. This will reduce memory requirements significantly.

      We can examine the _id and take advantage of this if we can force an index scan on the key, if there are no intervening pipeline operations that would affect the results.

              Assignee:
              [DO NOT USE] Backlog - Query Execution
              Reporter:
              Daniel Pasette (Inactive)
              Votes:
              56 Vote for this issue
              Watchers:
              76 Start watching this issue

                Created:
                Updated: