Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
N/A
-
None
Description
Upon request, I intentionally make tables bigger than they need to be for reproducing the problem, so that both the number of rows and the number of unique values exceed the histogram size.
--source include/have_sequence.inc
|
|
CREATE TABLE t1 (f TIME) ENGINE=MyISAM; |
INSERT INTO t1 SELECT IF(seq%2,'00:00:00',SEC_TO_TIME(seq+7200)) FROM seq_1_to_1000; |
|
SET histogram_type= JSON_HB; |
ANALYZE TABLE t1 PERSISTENT FOR ALL; |
ANALYZE FORMAT=JSON SELECT * FROM t1 WHERE f > '00:01:00'; |
|
SET histogram_type= DOUBLE_PREC_HB; |
ANALYZE TABLE t1 PERSISTENT FOR ALL; |
ANALYZE FORMAT=JSON SELECT * FROM t1 WHERE f > '00:01:00'; |
|
DROP TABLE t1; |
JSON_HB:
preview-10.8-MDEV-26519-json-histograms da3231a8 |
"table": {
|
"table_name": "t1",
|
"access_type": "ALL",
|
"r_loops": 1,
|
"rows": 1000,
|
"r_rows": 1000,
|
"r_table_time_ms": 0.037146099,
|
"r_other_time_ms": 0.077310006,
|
"filtered": 99.75002289,
|
"r_filtered": 50,
|
"attached_condition": "t1.f > '00:01:00'"
|
}
|
DOUBLE_PREC_HB:
"table": {
|
"table_name": "t1",
|
"access_type": "ALL",
|
"r_loops": 1,
|
"rows": 1000,
|
"r_rows": 1000,
|
"r_table_time_ms": 0.033997955,
|
"r_other_time_ms": 0.07762081,
|
"filtered": 50,
|
"r_filtered": 50,
|
"attached_condition": "t1.f > '00:01:00'"
|
}
|
Attachments
Issue Links
- is caused by
-
MDEV-26519 JSON Histograms: improve histogram collection
- Closed