1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-06 05:42:06 +03:00
Files
mariadb/mysql-test/suite/sys_vars/r
unknown da5214831d Fix for bug lp:944706, task MDEV-193
The patch enables back constant subquery execution during
query optimization after it was disabled during the development
of MWL#89 (cost-based choice of IN-TO-EXISTS vs MATERIALIZATION).

The main idea is that constant subqueries are allowed to be executed
during optimization if their execution is not expensive.

The approach is as follows:
- Constant subqueries are recursively optimized in the beginning of
  JOIN::optimize of the outer query. This is done by the new method
  JOIN::optimize_constant_subqueries(). This is done so that the cost
  of executing these queries can be estimated.
- Optimization of the outer query proceeds normally. During this phase
  the optimizer may request execution of non-expensive constant subqueries.
  Each place where the optimizer may potentially execute an expensive
  expression is guarded with the predicate Item::is_expensive().
- The implementation of Item_subselect::is_expensive has been extended
  to use the number of examined rows (estimated by the optimizer) as a
  way to determine whether the subquery is expensive or not.
- The new system variable "expensive_subquery_limit" controls how many
  examined rows are considered to be not expensive. The default is 100.

In addition, multiple changes were needed to make this solution work
in the light of the changes made by MWL#89. These changes were needed
to fix various crashes and wrong results, and legacy bugs discovered
during development.
2012-05-17 13:46:05 +03:00
..
2012-01-13 15:50:02 +01:00
2012-01-16 21:13:05 +01:00
2012-01-13 15:50:02 +01:00
2011-12-12 23:58:40 +01:00
2011-10-19 21:45:18 +02:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-10-19 21:45:18 +02:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2012-01-13 15:50:02 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-10-19 21:45:18 +02:00
2011-10-19 21:45:18 +02:00
2011-10-19 21:45:18 +02:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-10-19 21:45:18 +02:00
2011-10-19 21:45:18 +02:00
2011-12-12 23:58:40 +01:00
2012-01-13 15:50:02 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-12 23:58:40 +01:00
2011-12-28 03:51:12 +01:00
2011-12-12 23:58:40 +01:00
2011-10-19 21:45:18 +02:00
2011-10-19 21:45:18 +02:00
2011-12-12 23:58:40 +01:00