diff options
author | Igor Babaev <igor@askmonty.org> | 2013-03-30 22:00:04 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-03-30 22:00:04 -0700 |
commit | 78bab7839502e02d6d62b50d99ac9b0637acb4a1 (patch) | |
tree | dd345c47c4d9a55e1061697151b9e6d38b2a5e07 /mysql-test/t/selectivity.test | |
parent | 905549863454647b6070e23b7cf5fc1394f92750 (diff) | |
parent | 9e1ca1053b5e619e1f6c727abdf787dc163ab4e6 (diff) | |
download | mariadb-git-78bab7839502e02d6d62b50d99ac9b0637acb4a1.tar.gz |
Merge
Diffstat (limited to 'mysql-test/t/selectivity.test')
-rw-r--r-- | mysql-test/t/selectivity.test | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test index 5ec24d5f66e..9dda4af61eb 100644 --- a/mysql-test/t/selectivity.test +++ b/mysql-test/t/selectivity.test @@ -17,6 +17,7 @@ use dbt3_s001; set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; set @save_histogram_size=@@histogram_size; +set @save_histogram_type=@@histogram_type; --disable_query_log --disable_result_log @@ -168,32 +169,47 @@ set optimizer_use_condition_selectivity=1; eval EXPLAIN EXTENDED $Q20; eval $Q20; +SELECT ((SELECT COUNT(*) FROM part WHERE p_name LIKE 'g%') / + (SELECT COUNT(*) FROM part)) AS sel; + set optimizer_use_condition_selectivity=3; eval EXPLAIN EXTENDED $Q20; eval $Q20; set histogram_size=15; +ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); + flush table part; +set optimizer_use_condition_selectivity=4; +eval EXPLAIN EXTENDED $Q20; +eval $Q20; + +set histogram_type='DOUBLE_PREC_HB'; +set histogram_size=30; + ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_name) INDEXES(); -set optimizer_use_condition_selectivity=4; +flush table part; + eval EXPLAIN EXTENDED $Q20; eval $Q20; +set histogram_type='SINGLE_PREC_HB'; set histogram_size=24; -flush table nation; - ANALYZE TABLE nation PERSISTENT FOR COLUMNS(n_name) INDEXES(); +flush table nation; + eval EXPLAIN EXTENDED $Q20; eval $Q20; DROP DATABASE dbt3_s001; +set histogram_type=@save_histogram_type; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; |