summaryrefslogtreecommitdiff
path: root/sql/opt_histogram_json.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2022-01-11 16:58:51 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:10:12 +0300
commitdb8f15be93ff462b738101e7db89bd609455f0fa (patch)
tree0e87d401b61b41864ad54b7889146498a18f80a8 /sql/opt_histogram_json.cc
parentd3e511d42111c23df93cdb1d3b464dcb711cae07 (diff)
downloadmariadb-git-db8f15be93ff462b738101e7db89bd609455f0fa.tar.gz
MDEV-27229: Estimation for filtered rows less precise ... #5
Followup: remove this line from get_column_range_cardinality() set_if_bigger(res, col_stats->get_avg_frequency()); and make sure it is only used with the binary histograms. For JSON histograms, it makes the estimates unnecessarily imprecise.
Diffstat (limited to 'sql/opt_histogram_json.cc')
-rw-r--r--sql/opt_histogram_json.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 7c037183f41..4305737df1c 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -962,7 +962,7 @@ std::string& Histogram_json_hb::get_end_value(int idx)
*/
double Histogram_json_hb::range_selectivity(Field *field, key_range *min_endp,
- key_range *max_endp)
+ key_range *max_endp, double avg_sel)
{
double min, max;