[MDEV-7487] Semi-join optimization for single-table update/delete statements Created: 2015-01-21 Updated: 2023-10-24 Resolved: 2023-03-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 11.1.0 |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Petrunia | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 5 |
| Labels: | Preview_10.11, Preview_11.1, optimizer, subquery | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Description |
|
Currently, single-table UPDATE/DELETE statements cannot take advantage of semi-join optimizations. This is because semi-join optimizations are parts of join optimization (which is not invoked for single-table UPDATE/DELETE). This task is about
Note that we do similar things for VIEWs: UPDATE multi_table_view SET =... is switched to be processed as multi-table UPDATE as soon as the server discovers that we're updating a multi-table VIEW. |
| Comments |
| Comment by Sergei Petrunia [ 2015-02-20 ] | ||||||||||||||||||||||||||||||||||||||||||
|
See also | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2022-06-20 ] | ||||||||||||||||||||||||||||||||||||||||||
|
OK to push | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Lena Startseva [ 2023-01-18 ] | ||||||||||||||||||||||||||||||||||||||||||
|
In branch bb-10.11-
| ||||||||||||||||||||||||||||||||||||||||||
| Comment by Lena Startseva [ 2023-01-18 ] | ||||||||||||||||||||||||||||||||||||||||||
|
With scripts there were created tests based on "main" suite to check for a server crash on update. Example of converting:
converts to
During the tests execution there was only one crash related to the parameter:
But this parameter ("cache_sp_in_show_create")created only for tests with special behavior in lock_sync.test so there were no null-pointer checks and that's why I got this crach. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Lena Startseva [ 2023-01-23 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Checked engine with update/delete tests:
In branch bb-10.11-
Tables with versioning:
Engine Spider check with small tests for (multi-)update/delete | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Lena Startseva [ 2023-02-14 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Testing of this task is completed. The latest version of the tests can be taken from the branch bb-10.11- | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-03-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
The commit for this task was pushed into 11.1 |