diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-09-06 11:53:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-09-06 11:53:10 +0200 |
commit | 244f0e6dd815b388282c15db4fe7f15533f4c8fc (patch) | |
tree | af138f2b3739a742c0c38173cdc86ec176fc0edd /mysql-test/main/selectivity_innodb.result | |
parent | 18af13b88ba580562981a190c25da128a2e9db26 (diff) | |
parent | 2842c369851a8afc2a944ce6f4f60fa052f20969 (diff) | |
download | mariadb-git-244f0e6dd815b388282c15db4fe7f15533f4c8fc.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/main/selectivity_innodb.result')
-rw-r--r-- | mysql-test/main/selectivity_innodb.result | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result index 16f84ff3402..450f9fb9f5c 100644 --- a/mysql-test/main/selectivity_innodb.result +++ b/mysql-test/main/selectivity_innodb.result @@ -13,7 +13,8 @@ set use_stat_tables='preferably'; set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; set @save_histogram_size=@@histogram_size; set @save_histogram_type=@@histogram_type; -set histogram_size=0; +set join_cache_level=2; +set @@global.histogram_size=0,@@local.histogram_size=0; set histogram_type='single_prec_hb'; set optimizer_use_condition_selectivity=3; create table t1 (a int); @@ -1650,8 +1651,6 @@ drop function f1; # # MDEV-19834 Selectivity of an equality condition discounted twice # -set @@optimizer_use_condition_selectivity=4; -set @@use_stat_tables='preferably'; create table t1 (a int, b int, key (b), key (a)); insert into t1 select (rand(1)*1000)/10, (rand(1001)*1000)/50 from seq_1_to_1000; @@ -1662,25 +1661,27 @@ test.t1 analyze status OK # Check what info the optimizer has about selectivities explain extended select * from t1 use index () where a in (17,51,5); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 3.90 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 3.83 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`a` in (17,51,5) explain extended select * from t1 use index () where b=2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 5.47 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 5.47 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`b` = 2 # Now, the equality is used for ref access, while the range condition # gives selectivity data explain extended select * from t1 where a in (17,51,5) and b=2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.90 Using where; Using rowid filter +1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.66 Using where; Using rowid filter Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5) drop table t1; set use_stat_tables= @save_use_stat_tables; +set @@histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; # End of 10.1 tests +set @@global.histogram_size=@save_histogram_size; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; set @tmp_ust= @@use_stat_tables; set @tmp_oucs= @@optimizer_use_condition_selectivity; @@ -1830,4 +1831,5 @@ drop view v1; # set use_stat_tables= @tmp_ust; set optimizer_use_condition_selectivity= @tmp_oucs; +set @@global.histogram_size=@save_histogram_size; SET SESSION STORAGE_ENGINE=DEFAULT; |