[SERVER-77276] Push $limit stage into the PlanStage for time-series collection Created: 18/May/23 Updated: 29/Oct/23 Resolved: 16/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Backlog - Query Integration |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Integration
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | QI 2023-06-12, QI 2023-06-26 | ||||||||
| Participants: | |||||||||
| Description |
|
Add time-series query rewrite to push $limit into the PlanStage so that we don't fetch buckets that are not necessary It is safe to assume that every bucket has at least one measurement. So we can rewrite an [{$_unpack}, {$limit: x}] pipeline as [{$limit: x}, {$_unpack}, {$limit: x}] . Similarly we can push the limit values inside $sort when we do $sort pushdown |
| Comments |
| Comment by Githook User [ 15/Jun/23 ] |
|
Author: {'name': 'Alice Li', 'email': 'alice.li@mongodb.com', 'username': ''}Message: |