[SERVER-58134] Map agg comparison predicates on time-series collections to bucket-level fields Created: 28/Jun/21 Updated: 29/Oct/23 Resolved: 13/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Katherine Wu (Inactive) | Assignee: | Katherine Wu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-11-15, QO 2021-11-29, QO 2021-12-13, QO 2021-12-27, QO 2022-01-10, QO 2022-01-24, QO 2021-08-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
As part of the time-series query rewrites, MatchExpression predicates like {meta.host: {$eq: "host_0"}} are mapped onto bucket-level fields and pushed in front of the _internalUnpackBucket stage so they can potentially utilize an index. We should do something similar to aggregation comparison predicates like {$expr: {$eq: ["$meta.host", "host_0]}} which currently do not participate in this mapping optimization and thus require all the buckets to be unpacked. |
| Comments |
| Comment by Githook User [ 10/Jan/22 ] |
|
Author: {'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com', 'username': 'kaywux'}Message: |