[SERVER-44324] Template SortExecutor to be able to sort either WorkingSetMember or Document, improving agg sort perf Created: 30/Oct/19 Updated: 29/Oct/23 Resolved: 04/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Query 2019-11-04, Query 2019-11-18 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
Performance tests show that it is faster to sort Document than to sort WorkingSetMember. The system is currently always sorting WorkingSetMember objects, even in the context of DocumentSource execution, where a WorkingSetMember must be created to contain the Document. We can optimize sorts that take place in the DocumentSource layer by sorting the Document objects directly. In the future, we could also use the templated SortExecutor in order to optimize the SortStage itself: for fetched data, it's likely faster to sort Document or even BSONObj in the PlanStage layer. |
| Comments |
| Comment by Githook User [ 04/Nov/19 ] |
|
Author: {'username': 'dstorch', 'email': 'david.storch@mongodb.com', 'name': 'David Storch'}Message: This improves the performance of blocking sort operations |