Details
-
Improvement
-
Status: Closed
-
Minor - P4
-
Resolution: Duplicate
-
None
-
None
-
None
Description
It would be great for a $group stage to use indexes for easy group.
For example, this aggregation
[
|
{
|
$group: {
|
_id: "$media",
|
count: {$sum:1}
|
}
|
},
|
{
|
$sort: {
|
count: 1
|
}
|
},
|
{
|
$limit: 10
|
}
|
]
|
is not using the "media" index.
Attachments
Issue Links
- duplicates
-
SERVER-4507 aggregation: optimize $group to take advantage of sorted sequences
-
- Backlog
-
- related to
-
SERVER-21471 Bad index selection on aggregate with $match + $sort
-
- Closed
-