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

Index statistics disappear from existing partitions when a new partition is added

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6
    • 10.6
    • Partitioning
    • None

    Description

      When adding a new partition the statistics disappear from existing partitions.

      This is not specific for one table but it's general for all partitioned tables schemas.

      SELECT partition_name, table_rows FROM information_schema.partitions WHERE table_name ='XXXX';
      +----------------+------------+
      | partition_name | table_rows |
      +----------------+------------+
      | p2022_05_25    |          0 |
      | p2022_05_26    |          0 |
      | p2022_05_27    |          0 |
      | p2022_05_28    |          0 |
      | p2022_05_29    |          0 |
      | p2022_05_30    |          0 |
      | p2022_05_31    |          0 |
      | p2022_06_01    |          0 |
      | p2022_06_02    |          0 |
      | p2022_06_03    |          0 |
      | p2022_06_04    |          0 |
      | p2022_06_05    |          0 |
      | p2022_06_06    |          0 |
      | p2022_06_07    |          0 |
      | p2022_06_08    |         72 |
      | p2022_06_09    |   33576782 |
      

      An explicit ALTER ONLINE TABLE XXXX ANALYZE PARTITION p2022_05_26;

      Restored the statistics for such partition.

      > SELECT partition_name, table_rows FROM information_schema.partitions WHERE table_name ='XXXX';
      +----------------+------------+
      | partition_name | table_rows |
      +----------------+------------+
      | p2022_05_26 | 116803372 |
      

      Attached global variables.

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            claudio.nanni Claudio Nanni
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.