MySQL 8.0 introduces many new features. We will have a look at the exciting histogram feature in MySQL 8.0
Histogram:
What is Histogram?
In General, a histogram is an accurate representation of the distribution of numerical data. In MySQL, It will be useful to collect data distribution for a specific column.
What problem it solves?
In general DB Optimizer gives us the best execution plan, But the stats make the execution plan better and better .The data distribution of values in columns can make good impact in optimiser in case of column with less distinct values.
We will see an example of how it helps optimizer in some cases.
I have used a production case. MySQL version is 8.0.15 installed in ubuntu 18.04 (32GB RAM,8 core) with optimal configuration. Let us try to optimise a …
[Read more]