[SERVER-61656] Last point TS Opt M6: $topn(1) and/or $top Created: 19/Nov/21 Updated: 29/Oct/23 Resolved: 13/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Ruslan Abdulkhalikov (Inactive) | Assignee: | Alya Berciu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
A query like this:
or
Will be rewritten to something like this to get the last point optimization:
|
| Comments |
| Comment by Githook User [ 13/Apr/22 ] |
|
Author: {'name': 'Alya Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}Message: |
| Comment by Steve Tarzia [ 15/Mar/22 ] |
|
kyle.suarez , to answer your Jan 14 question, no, it's rewriting certain "last point" $topN queries into the format that will take advantage of a DISTINCT_SCAN. Note that there's a slack thread open right now to clarify whether we want to prioritize $top or $topN (or do both). |
| Comment by Kyle Suarez [ 14/Jan/22 ] |
|
Does this ticket involve optimizing the new $topN accumulator specifically? |