diff options
author | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-08-16 00:24:52 +0300 |
---|---|---|
committer | Galina Shalygina <galina.shalygina@mariadb.com> | 2018-09-28 23:50:22 +0300 |
commit | 8d5a11122c32f4d9eb87536886c6e893377bdd07 (patch) | |
tree | ab8cc222d336acd0006a544abb362affc149f671 /sql/sql_select.h | |
parent | befc09f00263d5375b2bb2ea0fac70b6cb0cb7fd (diff) | |
download | mariadb-git-8d5a11122c32f4d9eb87536886c6e893377bdd07.tar.gz |
MDEV-16188: Use in-memory PK filters built from range index scans
First phase: make optimizer choose to use filter and show it in EXPLAIN.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 4140a0293f8..de3dff46189 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -506,6 +506,9 @@ typedef struct st_join_table { uint n_sj_tables; bool preread_init_done; + /* Copy of POSITION::filter, set by get_best_combination() */ + Range_filter_cost_info *filter; + Dynamic_array<char*> rowid_filter_pk; void cleanup(); inline bool is_using_loose_index_scan() @@ -656,6 +659,7 @@ typedef struct st_join_table { SplM_plan_info *choose_best_splitting(double record_count, table_map remaining_tables); bool fix_splitting(SplM_plan_info *spl_plan, table_map remaining_tables); + bool save_filter_explain_data(Explain_table_access *eta); } JOIN_TAB; @@ -881,6 +885,9 @@ public: }; +class Range_filter_cost_info; + + /** Information about a position of table within a join order. Used in join optimization. @@ -963,6 +970,8 @@ typedef struct st_position /* Info on splitting plan used at this position */ SplM_plan_info *spl_plan; + /* The index for which filter can be built */ + Range_filter_cost_info *filter; } POSITION; typedef Bounds_checked_array<Item_null_result*> Item_null_array; |