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

aggregation: optimize $group to take advantage of sorted sequences

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 10 (02/22/16), Query 11 (03/14/16), Query 12 (04/04/16)
    • Case:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                25 Vote for this issue
                Watchers:
                37 Start watching this issue

                Dates

                • Created:
                  Updated: