[SERVER-68483] Use multikey metadata for more precise array estimation Created: 02/Aug/22 Updated: 05/Dec/22 Resolved: 15/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Timour Katchaounov | Assignee: | Backlog - Query Optimization |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | M4 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The optimizer collects metadata about path multikeyness (whether a path contains arrays). This metadata is available via the method ScanDefinition::getNonMultiKeyPathSet() that returns all paths that do NOT contain arrays. This task should use this metadata to improve cardinality estimation in the cases when such metadata is available. This metadata has priority over statistics - that is, if statistics says there are arrays, but the metadata says there aren't, we trust the metadata. Normally this shouldn't happen. We can also use this information for heuristic estimation, for instance a query that uses an array comparison value will return 0 matches if there are no arrays. |
| Comments |
| Comment by Timour Katchaounov [ 15/Sep/22 ] |
|
This task won't be needed since |