[MDEV-537] Make multi-column non-top level subqueries to be executed via index (index/unique subquery) instead of single_select_engine Created: 2012-09-17 Updated: 2013-02-07 Resolved: 2013-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.0.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Timour Katchaounov (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Multi-column non-top level subqueries can be executed via the unique_subquery/index_subquery methods instead of the general single_select engine. If the same queries are transformed into single-column INs, then unique_subquery/index_subquery is chosen. However in some cases the IN-EXISTS transformation for multi-column subqueries adds unnecessary null-rejecting conditions that prevent the use of the index-based subquery access methods. The problem is that the method {Item_in_subselect::create_row_in_to_exists_cond()}} adds Item_is_not_null_test and Item_func_trig_cond without looking at the left IN operand. At the same time, the analogous method for single columns does that, and doesn't add the above conditions if the left argument cannot be NULL. The proposed patch is:
The change is proposed for 10.0 because it will change all affected query plans to use new access methods. |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2013-02-06 ] |
|
The implementation has been tested by Elena, and is waiting for 10.0.1 to be released in order to be pushed to 10.0.2. |
| Comment by Timour Katchaounov (Inactive) [ 2013-02-07 ] |
|
merged & tested with latest 10.0, pushed to 10.0.02 |