lp:~maria-captains/maria/10.0-mdev83

Created by Timour Katchaounov on 2012-12-11 and last modified on 2013-12-31
Get this branch:
bzr branch lp:~maria-captains/maria/10.0-mdev83
Members of Maria-captains can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Maria-captains
Project:
MariaDB
Status:
Development

Recent revisions

3761. By Sergey Petrunia on 2013-12-31

Added comments

3760. By Sergey Petrunia on 2013-12-30

Merge

3759. By Timour Katchaounov on 2013-12-09

MDEV-83 Cost-based choice for the pushdown of subqueries to joined tables

Added the cost of expensive pushdown conditions to the cost of
non-materialized semi-join plans. Until this patch, only sj-mat
plans took into account the costs of inner subqueries.
This change makes all semi-join plans take into account subquery
costs.

3758. By Timour Katchaounov on 2013-11-29

MDEV-83 Cost-based choice for the pushdown of subqueries to joined tables

Introduced a sepate set of expensive top-level conjuncts of the WHERE clause
so that the computation of the added cost of such conjuncts during optimization
goes only over this list, instead of all conjuncts of the WHERE clause.
(review comment by Igor)

3757. By Timour Katchaounov on 2013-11-08

MDEV-83

Minor pos-review fixes (renames, comments).

3756. By Timour Katchaounov on 2013-11-08

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 on 2013-11-06

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 on 2013-11-04

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 on 2013-11-01

MDEV-83

- commented out all system variables related to dynamic pushdown
- adjusted test cases

3752. By Timour Katchaounov on 2013-10-31

- 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

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:maria
This branch contains Public information 
Everyone can see this information.

Subscribers