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

Allow aggregation $group operator to use an index

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Aggregation Framework
    • None
    • ALL

    Description

      Given an index on {a:1, b:1, c:1}, the following aggregations could make use of it to run more efficiently

      db.foo.aggregate([{$group: {_id: "$a", b_sum: {$sum: '$b'}}}])
      db.foo.aggregate([{$group: {_id: {a: "$a", b: "$b"}, c_sum: {$sum: '$c'}}}])

      And other similar aggregations

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joanna.cheng@mongodb.com Joanna Cheng
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: