[MDEV-26721] Histograms are not calculated for geometry columns Created: 2021-09-29  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: GIS, Optimizer
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When ANALYZE TABLE .. PERSISTENT is run for geometry columns, the statistics for them is collected and put into mysql.column_stats, but histogram field remains NULL. It is different from, for example, blobs for which statistics aren't collected at all.

I couldn't find out whether it is intentional. If it is, maybe it's worth mentioning in the KB.

CREATE OR REPLACE TABLE t (g GEOMETRY);
INSERT INTO t VALUES (POINT(0,0)),(POINT(1,1)),(POINT(2,2));
 
SET histogram_type= SINGLE_PREC_HB, histogram_size= 255;
 
ANALYZE TABLE t PERSISTENT FOR ALL;
 
SELECT DECODE_HISTOGRAM(hist_type,histogram) FROM mysql.column_stats where table_name = 't';
 
# Cleanup
DROP TABLE t;

10.6 27738bd7

SELECT DECODE_HISTOGRAM(hist_type,histogram) FROM mysql.column_stats where table_name = 't';
DECODE_HISTOGRAM(hist_type,histogram)
NULL


Generated at Thu Feb 08 09:47:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.