[CQF] Satisfy 'Traverse ComposeM' predicates with IndexScan + Filter
(SERVER-71871)
|
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Sub-task | Priority: | Major - P3 |
| Reporter: | Svilen Mihaylov (Inactive) | Assignee: | Matt Olma |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | bonsai-onboarding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QO 2023-05-15, QO 2023-05-29, QO 2023-06-12, QO 2023-06-26, QO 2023-07-10, QO 2023-07-24, QO 2023-08-07, QO 2023-08-21, QO 2023-09-04, QO 2023-09-18, QO 2023-10-02, QO 2023-10-16, QO 2023-10-30 |
| Participants: |
| Description |
|
Consider a filter expression such as Get "a" Arr. If "a" is never multikey this expression can never be true. The task is to extend the logical rewrite which transforms a filter expression to do the above. Specifically: Given a collection coll with {id, x}{} where x is a scalar field (i.e., no arrays) and an index on field {}x{_}. query:
successfully recognizes that x is a scalar field and simplifies the expression to return nothing without scanning the collection. On the other hand, query:
which assumes a subfield y in x despite x being scalar and not having a y subfield, the query actually scans the whole collection. We observe the same behavior even when we have an index on x.y. The ticket aims to alleviate this behavior and allow recognizing this opportunity for optimization. |
| Comments |
| Comment by Githook User [ 03/Aug/23 ] |
|
Author: {'name': 'Matt Olma', 'email': 'matt.olma@mongodb.com', 'username': 'mattsimply'}Message: |
| Comment by Githook User [ 02/Aug/23 ] |
|
Author: {'name': 'Matt Olma', 'email': 'matt.olma@mongodb.com', 'username': 'mattsimply'}Message: |