[SERVER-14303] Allow aggregation $group operator to use an index Created: 19/Jun/14  Updated: 10/Dec/14  Resolved: 26/Jun/14

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Joanna Cheng Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-11447 aggregation can sort using index to s... Closed
Operating System: ALL
Participants:

 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


Generated at Thu Feb 08 03:34:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.