summaryrefslogtreecommitdiff
path: root/sql/opt_histogram_json.h
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanupSergei Petrunia2022-01-191-4/+3
|
* MDEV-27229: Estimation for filtered rows less precise ... #5Sergei Petrunia2022-01-191-1/+1
| | | | | | | | | 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.
* MDEV-27229: Estimation for filtered rows less precise ... #5Sergei Petrunia2022-01-191-1/+1
| | | | Fix special handling for values that are right next to buckets with ndv=1.
* MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned charactersSergei Petrunia2022-01-191-1/+12
| | | | Encode such characters in hex.
* MDEV-26519: Improved histogramsSergei Petrunia2022-01-191-0/+5
| | | | | | | | Save extra information in the histogram: "target_histogram_size": nnn, "collected_at": "(date and time)", "collected_by": "(server version)",
* Rename histogram_hb_v2 -> histogram_hbSergei Petrunia2022-01-191-2/+2
|
* MDEV-26519: Improved histograms: Make JSON parser efficientSergei Petrunia2022-01-191-1/+5
| | | | | | | | Previous JSON parser was using an API which made the parsing inefficient: the same JSON contents was parsed again and again. Switch to using a lower-level parsing API which allows to do parsing in an efficient way.
* MDEV-26886: Estimation for filtered rows less precise with JSON histogramSergei Petrunia2022-01-191-1/+1
| | | | | | | | - Make Histogram_json_hb::range_selectivity handle singleton buckets specially when computing selectivity of the max. endpoint bound. (for min. endpoint, we already do that). - Also, fixed comments for Histogram_json_hb::find_bucket
* MDEV-26849: JSON Histograms: point selectivity estimates are offSergei Petrunia2022-01-191-1/+2
| | | | | | .. for non-existent values. Handle this special case.
* Use JSON_NAME, not the "histogram_hb_v2" constantSergei Petrunia2022-01-191-2/+2
|
* Fix off-by-one error in Histogram_json_hb::find_bucketSergei Petrunia2022-01-191-1/+1
|
* Address review inputSergei Petrunia2022-01-191-3/+3
|
* Valgrind fixes, poor .result fixes, code cleanupsSergei Petrunia2022-01-191-3/+1
| | | | | | | - Use String::c_ptr_safe() instead of String::c_ptr - Do proper datatype conversions in Histogram_json_hb::parse - Remove Histogram_json_hb::Bucket::end_value. Introduce get_end_value() instead.
* MDEV-26519: JSON Histograms: improve histogram collectionSergei Petrunia2022-01-191-3/+48
| | | | | | | | | | | Basic ideas: 1. Store "popular" values in their own buckets. 2. Also store ndv (Number of Distinct Values) in each bucket. Because of #1, the buckets are now variable-size, so store the size in each bucket. Adjust selectivity estimation functions accordingly.
* Fix compilation on windows part 2Sergei Petrunia2022-01-191-1/+1
|
* Rollback a change from previous commitSergei Petrunia2022-01-191-5/+3
|
* More code cleanupsSergei Petrunia2022-01-191-9/+1
| | | | | Remove Histogram_*::is_available(), it is not applicable anymore. Fix compilation on Windows
* Move JSON histograms code into its own filesSergei Petrunia2022-01-191-0/+95