lp:~maria-captains/maria/10.0-mdev4170
- Get this branch:
- bzr branch lp:~maria-captains/maria/10.0-mdev4170
Branch merges
Branch information
Recent revisions
- 3759. By Timour Katchaounov
-
MDEV-4170 Dynamic pushdown of subquery predicates
- fixed an error where the left-most pushdown tab was the left-most tab in a nest, instead of the tab where the condition can pushed the earliest
- fixed errors in the cost computation, mainly when the optimizer looks for optimal join order of the outer query,
its subqueries may not be optimized yet, and their cost may not be known.
- fixed several valgrind errors - 3758. By Timour Katchaounov
-
MDEV-4170 Dynamic pushdown of subquery predicates
- made improvements to, and fixed a number of errors in the selectivity
and cost estimates
- improved the wrapping of conditions into dynamic conditions, especially
wrt conditions attached to blocked joins
- removed the optimizer switch debug_record_cond_statistics
- added comments - 3756. By Timour Katchaounov
-
MDEV-83
Adress review comment that the cost of subqueries was computed incorrectly by just
summing all subquery costs.The patch computes the cost of all subqueries in a JOIN by multiplying the cost of
each subquery by the number of times it will be executed, depending on the JOIN_TAB
where the subquery is pushed.The added test case goes through the new cost computation logic, however there is
no way currently to show these intermediate costs at the SQL layer. - 3755. By Timour Katchaounov
-
MDEV-5201, MDEV-83
- Fixed bug MDEV-5201
Analysis:
The cause for the crash was that the call to skip_record() evaluated a subquery,
which set join->cur_exec_tab to the JOIN_TAB of the subquery. Consequently the
assert at the top-level JOIN failed.Solution:
Reset join->cur_exec_tab before each call skip_record().- addressed review comment to MDEV-83 to make the default cost of an Item to be 0
- 3754. By Timour Katchaounov
-
MDEV-83
Addressed review comment from Sergey that subsequent calls to
JOIN::static_pushdown_ cost will keep adding the same cost to
opt_pos in the case when opt_pos is part of a common prefix
for join plans with different extenstions.To address this the cost of expensive predicates is added to
POSITION::expensive_ pred_cost, which is reset during each call
to static_pushdown_ cost. The total cost is returned by
POSITION::get_read_ time() instead of accessing POSITION::read_time
directly. - 3753. By Timour Katchaounov
-
MDEV-83
- commented out all system variables related to dynamic pushdown
- adjusted test cases - 3752. By Timour Katchaounov
-
- Addressed review comments:
- moved the calculation of the extra cost of subquery predicates during join optimization
into a separate method JOIN::static_pushdown_ cost()
- fixed small errors in static_pushdown_ cost()
- added a call to this method into optimize_straight_ join, so that SELECT STRAIGHT_JOIN
is optimized in the same way as regular joins
- added test cases for SELECT STRAIGHT_JOIN
- Fixed bug MDEV-5178 Valgrind warnings (Conditional jump or move depends on uninitialised value) with static_cond_pushdown= on, FROM subquery - 3751. By Timour Katchaounov
-
MDEV-83 Cost-based choice for the pushdown of subqueries to joined tables
- Post-merge changes to make mdev-83 cooperate properly with the new EXPLAIN implementation.
- Moved setup_dynamic_conditions( ) to be called in the end of JOIN::optimize.
- Fixed wrong calculation of join_tab->exec_partial_ join_records for blocked joins.
- Adjusted tests and test results. - 3750. By Timour Katchaounov
-
MDEV-83 Cost-based choice for the pushdown of subqueries to joined tables
- Fixed a deficiency in the current implementation of both static and dynamic pushdown that
didn't take into account that blocked join algorithms use
- join_tab->cache_ select- >cond - to filter records before storing them in the current
partial join buffer
- join_tab->select- >cond - to filter join records
- Added a new optimizer switch "record_cond_statistics " that wraps all conditions with dynamic
and/or statistical Items, but doesn't "move" the conditions. This switch is useful only for
debugging and measuring execution overhead of dynamic conditions.
- Renamed the following switches:
- "expensive_pred_static_ pushdown" -> "static_ cond_pushdown"
- "expensive_pred_dynamic_ pushdown" -> "dynamic_ cond_pushdown"
- Improved debug printing of execution statistics.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:maria