[MDEV-27566] Benchmark-like test for JSON_HB histograms Created: 2022-01-21 Updated: 2023-12-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Tests |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | benchmarking, histogram-test, optimizer | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
(Filing this as a follow-up to discussions on Slack) Before making JSON_HB histograms enabled by default ( Note: we want to check for performance regressions, not histogram accuracy (Elena has run some tests for histogram accuracy already) Note: it won't be possible to avoid performance regressions completely. One can construct realistic-looking cases where improved histogram precision will cause a worse query plan due to the "Optimizer was making two wrong choices, we've fixed one" effect. The following was suggested: run some test that was not specifically designed with JSON_HB histograms in mind and check the results. The problem is finding a benchmark or workload where JSON_HB vs DOUBLE_PREC_HB difference will be apparent. |
| Comments |
| Comment by Sergei Petrunia [ 2022-01-25 ] | ||||||||||||||||||
|
Join Order Benchmark looks like a possible candidate. I've ran it for
The results are:
DOUBLE_PREC_HB histograms improve speed for 63 queries and cause 12 slowdowns (there are 113 queries in total).
Switching to JSON_HB made two queries faster, one query slower. | ||||||||||||||||||
| Comment by Sergei Petrunia [ 2022-01-25 ] | ||||||||||||||||||
|
The queries where using JSON_HB caused a change were:
|