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

InnoDB updated rec_per_key[] statistics is not published to the optimizer enough often

    XMLWordPrintable

Details

    Description

      Please, check upstream http://bugs.mysql.com/bug.php?id=70629. Based on the last comment from Vasil Dimov there:

      "The problem here is that InnoDB's statistics rec_per_key[] (or cardinality or n_diff[]) are published to the optimizer when ha_innobase::info(HA_STATUS_CONST) is called and it is called only when a table object is created (usually only when the table is opened). So when InnoDB recalculates the statistics due to subsequent DML, the old stats are being used to calculate the execution plan.

      We will do some experiments and will probably call ha_innobase::info(HA_STATUS_CONST) at the beginning of each query."

      I am not sure if calling ha_innobase::info(HA_STATUS_CONST) before every statement is a good idea, but it makes sense to check why it is not called (as it seems) when 10% of table data are changed and automatic recalculation by background thread happens.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            valerii Valerii Kravchuk
            Votes:
            1 Vote for this issue
            Watchers:
            7 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.