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

aggregation: optimize $group to take advantage of sorted sequences

    XMLWordPrintableJSON

Details

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

    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

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            54 Vote for this issue
            Watchers:
            72 Start watching this issue

            Dates

              Created:
              Updated: