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

SHOW STATUS unnecessary calls calc_sum_of_all_status

    XMLWordPrintable

Details

    Description

      SHOW GLOBAL STATUS and INFORMATION_SCHEMA.GLOBAL_STATUS always invoke calc_sum_of_all_status() to aggregate values of global status variables from session status variables into a temporary buffer.

      This is done even when no such aggregated variable will be returned to the user (e.g. because of LIKE 'uptime'. And calc_sum_of_all_status() can be rather expensive with many threads, see MDEV-15135, so it's a waste to call it and not use the result.

      The fix could be to call calc_sum_of_all_status() from show_status_array() when it stumbles upon a first variable that needs aggregation.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.