diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2022-01-11 17:09:55 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2022-01-19 18:10:12 +0300 |
commit | dae20dde4e7ae3ad6558eac9aa642fcccecaf13b (patch) | |
tree | afe0ffcad411726940448cc2de3579f5f52a8a46 /mysql-test/main/selectivity.result | |
parent | db8f15be93ff462b738101e7db89bd609455f0fa (diff) | |
download | mariadb-git-dae20dde4e7ae3ad6558eac9aa642fcccecaf13b.tar.gz |
MDEV-26901: Estimation for filtered rows less precise ... #4
In Histogram_json_hb::point_selectivity(), do return selectivity of 0.0
when the histogram says so.
The logic of "Do not return 0.0 estimate as it causes a multiply-by-zero
meltdown in cost and cardinality calculations" is moved into
records_in_column_ranges() where it is one *once* per column pair (as
opposed to doing once per range, which can cause the error to add-up
to large number when there are many ranges)
Diffstat (limited to 'mysql-test/main/selectivity.result')
-rw-r--r-- | mysql-test/main/selectivity.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result index d559d3c39f7..003b91a6a28 100644 --- a/mysql-test/main/selectivity.result +++ b/mysql-test/main/selectivity.result @@ -1245,8 +1245,8 @@ EXPLAIN EXTENDED SELECT * FROM language, country, continent WHERE country_group = lang_group AND lang_group IS NULL; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE country ALL NULL NULL NULL NULL 2 0.00 Using where -1 SIMPLE language ALL NULL NULL NULL NULL 6 0.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE country ALL NULL NULL NULL NULL 2 50.00 Using where +1 SIMPLE language ALL NULL NULL NULL NULL 6 16.67 Using where; Using join buffer (flat, BNL join) 1 SIMPLE continent ALL NULL NULL NULL NULL 6 100.00 Using join buffer (incremental, BNL join) Warnings: Note 1003 select `test`.`language`.`lang_group` AS `lang_group`,`test`.`language`.`lang` AS `lang`,`test`.`country`.`code` AS `code`,`test`.`country`.`country_group` AS `country_group`,`test`.`continent`.`cont_group` AS `cont_group`,`test`.`continent`.`cont` AS `cont` from `test`.`language` join `test`.`country` join `test`.`continent` where `test`.`language`.`lang_group` = `test`.`country`.`country_group` and `test`.`country`.`country_group` is null |