From b2c57cedbfd0f8ce2b4f67021a2aca5dedf9b6c9 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sun, 25 Apr 2010 12:23:52 +0400 Subject: Code cleanup in subquery optimizations --- sql/opt_subselect.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/opt_subselect.h') diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index d8716dbb77f..a9ed25fe311 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -1,4 +1,6 @@ -/* */ +/* + Semi-join subquery optimization code definitions +*/ #ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ @@ -365,4 +367,8 @@ int clear_sj_tmp_tables(JOIN *join); int rewrite_to_index_subquery_engine(JOIN *join); +void get_temptable_params(Item_in_subselect *item, ha_rows *out_rows, + ha_rows *scan_time); + +int do_jtbm_materialization_if_needed(JOIN_TAB *tab); -- cgit v1.2.1 From b9688830ecb3ab528770aaa00a4b57c29859dc65 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Mon, 10 May 2010 19:28:19 +0400 Subject: Subquery optimizations: - Better comments - Use more appropriate return types for functions - Provide handling where it was missing. --- sql/opt_subselect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/opt_subselect.h') diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index a9ed25fe311..75e4a0df202 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -370,5 +370,5 @@ int rewrite_to_index_subquery_engine(JOIN *join); void get_temptable_params(Item_in_subselect *item, ha_rows *out_rows, ha_rows *scan_time); -int do_jtbm_materialization_if_needed(JOIN_TAB *tab); +bool do_jtbm_materialization_if_needed(JOIN_TAB *tab); -- cgit v1.2.1 From 3f595889d35c81540eb14ef3c53105cb6c4db833 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sun, 23 May 2010 23:13:18 +0400 Subject: Subqueries: Inside-out execution for non-semijoin materialized subqueries that are AND-parts of the WHERE - Code cleanup - Query plan change is due to s/ha_rows JOIN_TAB::read_time/double JOIN_TAB::read_time/ --- sql/opt_subselect.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/opt_subselect.h') diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index 75e4a0df202..2f6c9d87367 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -367,8 +367,10 @@ int clear_sj_tmp_tables(JOIN *join); int rewrite_to_index_subquery_engine(JOIN *join); -void get_temptable_params(Item_in_subselect *item, ha_rows *out_rows, - ha_rows *scan_time); +void get_delayed_table_estimates(TABLE *table, + ha_rows *out_rows, + double *scan_time, + double *startup_cost); bool do_jtbm_materialization_if_needed(JOIN_TAB *tab); -- cgit v1.2.1 From dad93f2c822f174f4674c4a04c2382c18a262e36 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 4 Jun 2010 17:40:57 +0400 Subject: MWL#90, code movearound to unify merged and non-merged semi-join materialization processing - First code, needs cleanup. --- sql/opt_subselect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/opt_subselect.h') diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index 2f6c9d87367..b0dc4059858 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -372,5 +372,5 @@ void get_delayed_table_estimates(TABLE *table, double *scan_time, double *startup_cost); -bool do_jtbm_materialization_if_needed(JOIN_TAB *tab); +bool join_tab_execution_startup(JOIN_TAB *tab); -- cgit v1.2.1 From 946aef4a58337c6e5adf5a08d04dd397630f0c46 Mon Sep 17 00:00:00 2001 From: psergey Date: Sat, 10 Jul 2010 20:51:12 +0300 Subject: MWL#90: code cleanup - Remove deadcode - Improve comments - Do small several small TODOs --- sql/opt_subselect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/opt_subselect.h') diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index b0dc4059858..5ed995f74bf 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -372,5 +372,5 @@ void get_delayed_table_estimates(TABLE *table, double *scan_time, double *startup_cost); -bool join_tab_execution_startup(JOIN_TAB *tab); +enum_nested_loop_state join_tab_execution_startup(JOIN_TAB *tab); -- cgit v1.2.1