[SERVER-71763] CSI query planner enhancements for filter count, etc. Created: 01/Dec/22 Updated: 29/Oct/23 Resolved: 13/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Steve Tarzia | Assignee: | Alyssa Clark |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm2646-m4 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Linked BF Score: | 35 | ||||
| Description |
|
Column scan generally beats collection scans even when the collection and documents are small if the number of filters that get pushed down is large. This should be considered in the CSI plan selection heuristics. Also, we should look at combining the document size and collection size heuristics in a more intelligent way. My sense is that the heuristic should be something like this: Use a column scan only if:
This should let us choose column scan for the charts workload running on a low-memory instance and it may activate it for some appropriate queries on the regular instances. |
| Comments |
| Comment by Githook User [ 13/Dec/22 ] |
|
Author: {'name': 'Alyssa Wagenmaker', 'email': 'alyssa.wagenmaker@mongodb.com', 'username': 'awagenmaker'}Message: |
| Comment by Steve Tarzia [ 05/Dec/22 ] |
|
Note that we also have a heuristic for projection counts – I think it enables CSI only if the number of projected fields is less than 5 (with no filter pushdown) or less than 12 (if filters are being pushed down). This is a good time to think about how that heuristic should interact with the others. |