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

InnoDB persistent statistics fail to update after bulk insert

Details

    Description

      I have a bunch of CentOS 7 servers that I manage and we recently upgraded MariaDB from 10.5 to 10.6 on those servers. Now I'm seeing some odd problems which manifest as serious performance issues after I import a database. Meaning that SQL queries that were running in a short time suddenly became very slow.

      I then found that simply running "mysqlcheck -a" totally fixes the problem and I can reproduce this issue every time but I can't figure out what is causing it.

      In addition to the performance issues that I see, I also see odd stats from information_schema and the cardinality of the indexes. The latter part is I think why the SQL queries become slower.

      You can see a full test of this issue in the attached screenshot. I can put that into a code box but I thought the annotations made it easier to see the problems here. Anyone seen this before or have any idea what it going on?

      EDIT: additional info

      I found that disabling innodb_stats_persistent completely fixes the problem. Of course, that is likely not a real fix. Is there a problem with innodb_stats_persistent in MariaDB 10.6?

      Attachments

        1. ksnip_20220415-124405.png
          110 kB
          Brad
        2. MDEV-28327_testing-10.5.17.txt
          9 kB
          Brad
        3. MDEV-28327_testing-10.8.4.txt
          14 kB
          Brad
        4. wptest.sql
          717 kB
          Brad

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Marko Mäkelä made transition -
            Open Confirmed
            156d 17h 16m 1
            Thirunarayanan Balathandayuthapani made transition -
            Confirmed In Progress
            14d 21h 39m 1
            Thirunarayanan Balathandayuthapani made transition -
            In Progress In Review
            8d 1h 36m 1
            Marko Mäkelä made transition -
            In Review Stalled
            45m 53s 1
            Thirunarayanan Balathandayuthapani made transition -
            Stalled In Testing
            5d 1h 54m 1
            Matthias Leich made transition -
            In Testing Stalled
            7d 2h 8m 1
            Thirunarayanan Balathandayuthapani made transition -
            Stalled Closed
            14h 15m 1

            People

              thiru Thirunarayanan Balathandayuthapani
              wk_bradp Brad
              Votes:
              4 Vote for this issue
              Watchers:
              12 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.