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

aggregation: optimize $group to take advantage of sorted sequences

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

      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:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            55 Vote for this issue
            Watchers:
            73 Start watching this issue

              Created:
              Updated: