1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Sergei Petrunia
2022-01-11 16:58:51 +03:00
parent d3e511d421
commit db8f15be93
7 changed files with 33 additions and 16 deletions

View File

@ -191,7 +191,7 @@ public:
double avg_selectivity,
double total_rows)=0;
virtual double range_selectivity(Field *field, key_range *min_endp,
key_range *max_endp)=0;
key_range *max_endp, double avg_sel)=0;
/*
Legacy: return the size of the histogram on disk.
@ -353,7 +353,7 @@ public:
}
double range_selectivity(Field *field, key_range *min_endp,
key_range *max_endp) override;
key_range *max_endp, double avg_sel) override;
/*
Estimate selectivity of "col=const" using a histogram