Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
I am unable to create a double-precision histogram. I know this is weird - it
was mentioned at the optimizer call that double-precision histograms help,
which implies that somebody succeeded in creating them, but I am unable to.
I start the server and client like this, to have a clean environment
./mysql-test-run --start-and-exit mysql -uroot -A --socket=/data0/psergey/dev2/maria-10.0-mwl253/mysql-test/var/tmp/mysqld.1.sock
Then I run:
MariaDB [(none)]> set histogram_size=10;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> set histogram_type='double_prec_hb';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show variables like 'histogram%';
+----------------+----------------+
| Variable_name | Value |
+----------------+----------------+
| histogram_size | 10 |
| histogram_type | DOUBLE_PREC_HB |
+----------------+----------------+
2 rows in set (0.00 sec)
MariaDB [(none)]> use test;
Database changed
MariaDB [test]> create table t21 ( a int);
Query OK, 0 rows affected (0.01 sec)
MariaDB [test]> insert into t21 values (1),(2),(3),(4),(5);
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0
MariaDB [test]> analyze table t21 persistent for all;
+----------+---------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+---------+----------+----------+
| test.t21 | analyze | status | OK |
+----------+---------+----------+----------+
1 row in set (0.00 sec)
MariaDB [test]> select *, hex(histogram),length(histogram) from mysql.column_stats where db_name='test' and table_name='t21'\G
*************************** 1. row ***************************
db_name: test
table_name: t21
column_name: a
min_value: 1
max_value: 5
nulls_ratio: 0.0000
avg_length: 4.0000
avg_frequency: 1.0000
hist_size: 10
hist_type: SINGLE_PREC_HB
histogram: �?�����
hex(histogram): 0000FF3FFF7FFFBFFFFF
length(histogram): 10
1 row in set (0.00 sec)
So, I've got a single-precision histogram. Note that hist_type column is set,
unlike in MDEV-4357.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-4145 Take into account the selectivity of single-table range predicates on non-indexed columns when searching for the best execution plan
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
A fix for the bug has been pushed into maria-10.0-mwl253.