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

innodb index stats miscounted index fields

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 5.5.40
    • N/A
    • None
    • centos6-amd64

    Description

      idx_obs_daily_1 has 3 fields not 4.

      MariaDB [weather]> select * from information_schema.INNODB_INDEX_STATS where table_schema='weather' and table_name='obs_daily';
      +--------------+------------+-----------------+--------+---------------------+-------------------+------------------+
      | table_schema | table_name | index_name      | fields | rows_per_key        | index_total_pages | index_leaf_pages |
      +--------------+------------+-----------------+--------+---------------------+-------------------+------------------+
      | weather      | obs_daily  | PRIMARY         |      1 | 1                   |            212672 |           185818 |
      | weather      | obs_daily  | idx_obs_daily_2 |      2 | 3178, 1             |             28032 |            24434 |
      | weather      | obs_daily  | idx_obs_daily_1 |      4 | 2160489, 1271, 0, 0 |             46784 |            40750 |

      | obs_daily | CREATE TABLE `obs_daily` (
        `iId` int(11) NOT NULL AUTO_INCREMENT, 
        `sLocType` varchar(10) NOT NULL DEFAULT '',  
        `sLocCode` varchar(30) NOT NULL DEFAULT '',  
        `dtDate` date NOT NULL DEFAULT '0000-00-00',  
      ....
        PRIMARY KEY (`iId`),
        UNIQUE KEY `idx_obs_daily_1` (`sLocType`,`sLocCode`,`dtDate`),
        KEY `idx_obs_daily_2` (`dtDate`)
      ) ENGINE=InnoDB AUTO_INCREMENT=23562482 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC |

      Attachments

        Activity

          People

            Unassigned Unassigned
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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