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

Remove InnoDB persistent statistics, or store them within the .ibd file

    XMLWordPrintable

    Details

      Description

      InnoDB in MySQL 5.6 introduced persistent statistics, to help the optimizer choose query plans. The statistics are stored in two tables: mysql.innodb_index_stats and mysql.innodb_table_stats, using the InnoDB-internal SQL parser while holding an exclusive lock on the InnoDB data dictionary cache. This architecture involves a number of workarounds to locking problems. It could also break replication when users modify the statistics tables directly from SQL, because the internal transactions to modify the statistics tables are not replicated.

      The natural place to store the statistics is within the data file. If there is a real need to tweak the statistics other than by running ANALYZE TABLE, then an external tool could be written for that.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: