-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query Execution
-
Fully Compatible
-
Query 10 (02/22/16), Query 11 (03/14/16), Query 12 (04/04/16)
-
(copied to CRM)
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.
- depends on
-
SERVER-4566 In new aggregation framework, $sort, $limit in the pipeline seems loading all the matched data into memory. When we tried to improve the performance by leveraging multi thread aggregation, this makes it much slower than single thread
- Closed
- is depended on by
-
SERVER-5795 Very Poor Performances
- Closed
-
SERVER-84466 Complete TODO listed in SERVER-23318
- Backlog
- is duplicated by
-
SERVER-41891 $group on sorted cursor forces full collection scan
- Closed
-
SERVER-11447 aggregation can sort using index to speed up group of an indexed field
- Closed
-
SERVER-37242 $group on sort key (after $sort) could be optimized to avoid blocking
- Closed
-
SERVER-21502 $group using index
- Closed
- is related to
-
SERVER-2130 Ability to use Limit() with Distinct()
- Backlog
-
SERVER-447 new aggregation framework
- Closed
-
SERVER-29444 Use a covered and streaming plan for $group, $sum:1 queries
- Backlog
-
SERVER-9507 Optimize $sort+$group+$first pipeline to avoid full index scan
- Closed
-
SERVER-21022 Coalesce $group and $limit in aggregation pipeline
- Closed
- related to
-
SERVER-4961 $group is taking 2x as long as collection.group()
- Closed
-
SERVER-23477 Aggregation's streaming $group should become blocking when it evaluates an array field in the _id
- Closed
-
SERVER-5361 early $group should provide a hint to use an index matching the group key
- Closed
-
SERVER-20066 Query planner should consider index scans on empty query predicates
- Closed
-
SERVER-40056 Remove disabled partial implementation of streaming $group
- Closed
-
SERVER-55576 Optimize queries on time-series collections which request the most recent value
- Closed