[SERVER-82038] cmdObj isn't needed for runAggregate if no cursor is opened Created: 10/Oct/23 Updated: 15/Dec/23 Resolved: 15/Dec/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Will Buerger | Assignee: | Santiago Roche |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Integration
|
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
When running an aggregation pipeline over a view, we build the new AggregateCommandRequest with the resolved view and the original user-provided request. We then serialize the AggregateCommandRequest into a BSON cmdObj (here). In the IDHack path, this serialization takes somewhere around 1-2% of the query time, but the resulting cmdObj isn't actually necessary until a cursor is opened. We can avoid this time spent serializing if the results fit in one batch. |
| Comments |
| Comment by Githook User [ 14/Dec/23 ] |
|
Author: {'name': 'Santiago Roche', 'email': 'santiago.roche@mongodb.com', 'username': ''}Message: GitOrigin-RevId: 5f516f8473d2682bd45f023f74059a0c36872a2f |