diff options
author | Igor Babaev <igor@askmonty.org> | 2013-03-11 07:44:24 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-03-11 07:44:24 -0700 |
commit | fc1c8ffdadfd14eb51969ecfde43e3204f10f6f8 (patch) | |
tree | 70ee4b3628cc62a706476d6c7b873fcfc9aa0e10 /sql/sys_vars.cc | |
parent | 938d47dcdc50ae4f127197ed72fd044b33ea7524 (diff) | |
download | mariadb-git-fc1c8ffdadfd14eb51969ecfde43e3204f10f6f8.tar.gz |
The pilot patch for mwl#253.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index fcd2df7b338..7f6a00f3c62 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1424,6 +1424,22 @@ static Sys_var_ulong Sys_optimizer_prune_level( SESSION_VAR(optimizer_prune_level), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 1), DEFAULT(1), BLOCK_SIZE(1)); +static Sys_var_ulong Sys_optimizer_use_condition_selectivity( + "optimizer_use_condition_selectivity", + "Controls selectivity of which conditions the optimizer takes into " + "account to calculate cardinality of a partial join when it searches " + "for the best execution plan " + "Meaning: " + "1 - use selectivity of index backed range conditions to calculate " + "cardinality of the partial join if the last joined table is " + "accessed by full table scan or an index scan " + "2 - use selectivity of index backed range conditions to calculate " + "cardinality of the partial join in any case " + "3 - additionally always use selectivity of range conditions that are " + "not backed by any index to calculate cardinality of the partial join", + SESSION_VAR(optimizer_use_condition_selectivity), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(1, 3), DEFAULT(1), BLOCK_SIZE(1)); + /** Warns about deprecated value 63 */ static bool fix_optimizer_search_depth(sys_var *self, THD *thd, enum_var_type type) |