[SERVER-58276] Add time-series bounded collection scan plans to query multi-planner Created: 06/Jul/21 Updated: 29/Oct/23 Resolved: 02/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0, 6.0.7 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Katherine Wu (Inactive) | Assignee: | Ivan Fefer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | M2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.0
|
||||||||||||||||||||||||||||||||||||
| Sprint: | QO 2021-09-20, QO 2021-10-04, QE 2022-10-17, QE 2022-10-31, QE 2022-11-14 | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||||||||||||||||||
| Description |
|
After |
| Comments |
| Comment by Githook User [ 24/May/23 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: (cherry picked from commit 76e583ed12d536aba872920568b5324d1dcae713) |
| Comment by Githook User [ 02/Nov/22 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |
| Comment by Rushan Chen [ 23/Aug/22 ] |
|
Additional note from a cloesd PoC ticket which is a duplicate of this: "Our current query planner does not consider _id index for multi-planning. In the presence of a secondary index on timeField, we always use the secondary index. Using the index on time field, we scan the index tree, and then do another lookup in the record store to fetch the bucket document. Where as if we use the _id index, then we can answer the query with just scans on the record store. So some query might perform better with _id over time index. The downside of _id index is that we only index the control.min.time, where as an index on timeField with be compounded with control.min.time: 1, control.max.time. So the bounds will be narrower with timeField index. We need to evaluate this trade-off using multi-planning." Early experiment showed this could speed up queries with filter on time by about 5%.
|