1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Use binary search to compute range selectivity

* it also adds an "explain select" statement to the test so that the fprintf calls
  can print the computed intervals to mysqld.1.err

Signed-off-by: Michael Okoko <okokomichaels@outlook.com>
This commit is contained in:
Michael Okoko
2021-08-16 10:09:56 +01:00
committed by Sergei Petrunia
parent c605285bb8
commit c129689ddc
4 changed files with 89 additions and 99 deletions

View File

@ -28,7 +28,7 @@ set histogram_size=10;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT * FROM mysql.column_stats WHERE table_name='t1';
SELECT * FROM t1;
explain extended select * from t1 where b between '20' and '70';
# We then test different valid JSON strings that are invalid histograms.
UPDATE mysql.column_stats SET histogram='["1", {"a": "b"}, "2"]' WHERE table_name='t1';