diff options
author | Igor Babaev <igor@askmonty.org> | 2017-12-30 12:29:09 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-12-30 12:29:09 -0800 |
commit | 4f0299f8b3cf19c103138ff656a37c1f672e9de6 (patch) | |
tree | da7c706aed70d0bc25cecdcd1e9715abc9bb69e0 /sql/opt_subselect.cc | |
parent | 7a66e0ab8f52f3bd32850463daa05f9a2401e6b1 (diff) | |
download | mariadb-git-4f0299f8b3cf19c103138ff656a37c1f672e9de6.tar.gz |
This is a full cost-based implementation of the optimization that employs
splitting technique for equi-joins of materialized derived tables/views/CTEs.
(see mdev-13369 and mdev-13389).
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 9cd2eedb55d..dada23508b5 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -446,10 +446,6 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, Item_in_subselect *subq_pred, bool *remove); static TABLE_LIST *alloc_join_nest(THD *thd); static uint get_tmp_table_rec_length(Ref_ptr_array p_list, uint elements); -static double get_tmp_table_lookup_cost(THD *thd, double row_count, - uint row_size); -static double get_tmp_table_write_cost(THD *thd, double row_count, - uint row_size); bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables); static SJ_MATERIALIZATION_INFO * at_sjmat_pos(const JOIN *join, table_map remaining_tables, const JOIN_TAB *tab, @@ -2468,7 +2464,7 @@ static uint get_tmp_table_rec_length(Ref_ptr_array p_items, uint elements) @return the cost of one lookup */ -static double +double get_tmp_table_lookup_cost(THD *thd, double row_count, uint row_size) { if (row_count * row_size > thd->variables.max_heap_table_size) @@ -2488,7 +2484,7 @@ get_tmp_table_lookup_cost(THD *thd, double row_count, uint row_size) @return the cost of writing one row */ -static double +double get_tmp_table_write_cost(THD *thd, double row_count, uint row_size) { double lookup_cost= get_tmp_table_lookup_cost(thd, row_count, row_size); |