Currently, histograms are stored as array of 1-byte bucket bounds (SINGLE_PREC_HB) or or 2-byte bucket bounds (DOUBLE_PREC_HB).
The table storing the histograms supports different histogram formats but limits them to 256 bytes (hist_size is tinyint).
This prevents us from supporting other kinds of histograms.
The first low-hanging fruit would be to store the histogram bucket bounds precisely (like MySQL and PostgreSQL do, for example).
The idea of this MDEV is to switch to JSON as storage format for histograms.
If we do that, it will:
- Improve the histogram precision
- Allow the DBAs to examine the histograms
- Enable other histogram types to be collected/used.