Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26721

Histograms are not calculated for geometry columns

    XMLWordPrintable

    Details

      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
      

        Attachments

          Activity

            People

            Assignee:
            psergei Sergei Petrunia
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration