Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Fully Compatible
Description
This currently happens automatically if the split-point is a $group, but not if it is a $sort, $skip, or $limit. If any of the mongos-only stages return EXHAUSTIVE from getDependencies(), but none of the shard stages do, then a $project should be added to the end of the shard stages.
Advantages:
- reduce mongod -> mongos network traffic
- allow mongod to reify only needed fields
- allow more documents to be output from a shard before hitting 16MB limit.