[SERVER-72096] Use CSI row store fallback for queries with per-column filters Created: 14/Dec/22 Updated: 05/Jan/23 Resolved: 05/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Alyssa Clark |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | pm2646-m4 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Participants: |
| Description |
|
Follow on to SERVER-68591.
Queries with per-column filters will not switch to the row store using the heuristic. This ticket is to extend the path that reads directly from the row store to work for queries with per column filters. |
| Comments |
| Comment by Ian Boros [ 14/Dec/22 ] |
|
From what we know, the case where a query uses CSI with filter pushdown, and hits the fallback, and ends up being significantly slower is probably rare. We'll want to have some more conversation about this work before scheduling it. In my mind, we it would be worth making a best effort here. Something like: -Combine the per path match expressions into a single AND match expression -Attempt to convert that match expression to sbe::EExpression. If this fails, we just give up and not use the fallback. The set of match expressions which can't be converted to EExpression should be shrinking anyway. Also, this step may require some refactoring of the filter stage builder so that we can convert from MatchExpression to EExpression. -Pass the converted EExpression to the ColumnScanStage and apply it when reading directly from the row store.
For now leaving this in m4 so we can discuss it. |