Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
*Location*: http://docs.mongodb.org/master/core/aggregation-pipeline-optimization/#aggregation-pipeline-sequence-optimization
*User-Agent*: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
*Referrer*: http://docs.mongodb.org/master/core/aggregation-pipeline/
*Screen Resolution*: 2560 x 1440
*repo*: docs
*source*: core/aggregation-pipeline-optimization
*Location*: http://docs.mongodb.org/master/core/aggregation-pipeline-optimization/#aggregation-pipeline-sequence-optimization *User-Agent*: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 *Referrer*: http://docs.mongodb.org/master/core/aggregation-pipeline/ *Screen Resolution*: 2560 x 1440 *repo*: docs *source*: core/aggregation-pipeline-optimization
Description
None of these optimizations are real. These are all special cases of other optimizations.
The last one is odd since if there is a group, it is better not to add the project. The general rule is that if only a subset of fields are needed, agg will figure that out and only use those fields in a way that is more efficient than an explicit $project. You can see what fields it thinks are needed by running an explain. A $project should only be added if agg gets it wrong.
Attachments
Issue Links
- is related to
-
DOCS-2981 agg rewrite
-
- Closed
-