[MDEV-38] NOT EXISTS to IN (part of exists2in transformation for 10.0) Created: 2012-01-04 Updated: 2013-02-26 Resolved: 2013-02-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.0.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Rasmus Johansson (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Transform queries like:
and
into
To allow optimizations made for IN/ALL/ANY subqueries. Conversion is possible only if: For NOT EXISTS conversion the subquery should be marked that its left part can't Note: Number of equalities could be limited by already allocated space for select list for current implementation. |
| Comments |
| Comment by Oleksandr Byelkin [ 2012-02-08 ] |
|
I checked that current implementation uses full match (that is what we wanted). |
| Comment by Oleksandr Byelkin [ 2012-02-23 ] |
|
Added multi-item support. Waiting for test results. |
| Comment by Oleksandr Byelkin [ 2012-10-15 ] |
|
Start after review work... |
| Comment by Oleksandr Byelkin [ 2012-10-22 ] |
|
Problem with view test could be problem of unset flag due to absence of real execution of the query (no result after reading constant tables). |
| Comment by Oleksandr Byelkin [ 2012-11-12 ] |
|
Move to 10.0 |
| Comment by Sergei Petrunia [ 2012-11-27 ] |
|
It seems, it is easy to support EXISTS->IN conversion anywhere (not only on top level of WHERE or under NOT). EXISTS's NULLs handling policy is easier than that of IN, so we'll just need to introduce/use NULL-oblivious-IN. Details in the email. need to discuss it., |
| Comment by Sergei Petrunia [ 2012-11-27 ] |
|
DBT-3 has EXISTS subqueries. In Q4 and Q22 - optimization is applicable, in Q21 optimization not applicable (non-equality correlated conditions). I don't expect these queries to benefit from this optimization (they all seem to be better served by IN-to-EXISTS strategy), though. We'll also need to check for regressions, just in case. |
| Comment by Oleksandr Byelkin [ 2013-02-26 ] |
|
pushed to 10.0-base |