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

Some InnoDB counters are duplicating generic SHOW STATUS

    XMLWordPrintable

Details

    Description

      The InnoDB srv_stats counters n_rows_updated, n_rows_deleted, n_rows_inserted, and n_rows_read are duplicating Handler_update, Handler_delete, Handler_write, and various Handler_read_ counters.

      Updating those counters is not free, especially because some counters are furthermore split to distinguish a rare case of modifying tables in the system schema:

      		if (table->is_system_db) {
      			srv_stats.n_system_rows_updated.inc(size_t(trx->id));
      		} else {
      			srv_stats.n_rows_updated.inc(size_t(trx->id));
      		}
      

      On a related note, handler::increment_statistics() which updates the common status variables, does not employ any caching or sharding whatsoever. It could be better to first update the counters directly in handler data members and only update global counts at the end of each statement.

      Attachments

        Issue Links

          Activity

            People

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