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

Useless INSERT BUFFER AND ADAPTIVE HASH INDEX output in SHOW ENGINE INNODB STATUS

    XMLWordPrintable

    Details

      Description

      Starting with MariaDB Server 10.5.0, the InnoDB adaptive hash index is disabled by default (MDEV-20487).

      There are two counters btr_cur_n_non_sea and btr_cur_n_sea that can be used to determine the usefulness of the adaptive hash index. These counters are only exposed via SHOW ENGINE INNODB STATUS, via the section INSERT BUFFER AND ADAPTIVE HASH INDEX, which includes output like this:

      	const ulint with_ahi = btr_cur_n_sea, without_ahi = btr_cur_n_non_sea;
      	fprintf(file,
      		"%.2f hash searches/s, %.2f non-hash searches/s\n",
      		static_cast<double>(with_ahi - btr_cur_n_sea_old)
      		/ time_elapsed,
      		static_cast<double>(without_ahi - btr_cur_n_non_sea_old)
      		/ time_elapsed);
      	btr_cur_n_sea_old = with_ahi;
      	btr_cur_n_non_sea_old = without_ahi;
      

      It does not make any sense to update the counter btr_cur_n_non_sea when the adaptive hash index is disabled. As noted in MDEV-21212, such updates come with a cost.

      However, removing the update is a user-visible change, because the above output would show something like the following even when the adaptive hash index is disabled:

      0.00 hash searches/s, xxx.xx non-hash searches/s
      

      Therefore, we cannot remove the counter update (or the message output) in any generally available release series.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.