[MDEV-23707] Fix condition selectivity computation for join prefixes Created: 2020-09-09 Updated: 2023-10-30 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | None |
| Fix Version/s: | 11.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | eits | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Description |
|
There is a bunch of known issues with condition selectivity computations for join prefixes : (MDEV-20740, MDEV-20595, MDEV-20697, MDEV-20740, This task is an umbrella task for fixing them. |
| Comments |
| Comment by Sergei Petrunia [ 2020-11-12 ] |
|
Notes from the optimizer call: Igor has mentioned "Consistency property" - regardless of the query plan used, the estimated join output cardinality should be the same. Other query optimizers have it. But it has never been mentioned in the context of MariaDB' selectivity code. (and btw MySQL doesn't seem to have it, either). Besides the whole join, it can apply to a sub-join. |
| Comment by Sergei Petrunia [ 2020-11-13 ] |
|
The consistency would be easier to achieve if table fanouts were not tightly coupled to the access methods used. Currently, they are. Another problem is multiple-equalities. A multiple equality taken together with a selective predicate (like t1.col1=t2.col2 AND t1.col1<10 creates implied correlated equalities ("t2.col<10" in this case). |