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

QUERY_RESPONSE_TIME counts SHOW statements and I_S queries as "writes"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.5.1
    • Plugins
    • None

    Description

      Now when query_response_time started distinguishing "read" and "write" statements in the scope of MDEV-33501, it includes at least some SHOW statements or SELECT ... FROM INFORMATION_SCHEMA.xxx as "write". I don't think users would expect it.

      install soname 'query_response_time';
      set global query_response_time_stats= 1;
       
      flush query_response_time_write;
       
      show query_response_time_write where Count > 0;
      show query_response_time_write where Count > 0;
      select count(*) from information_schema.query_response_time;
      show query_response_time_write where Count > 0;
      show tables;
      show query_response_time_write where Count > 0;
       
      uninstall soname 'query_response_time';
      

      bb-11.5-MDEV-33501-query-response-time bc19460f3708e34fe8c94a3b1b8738ab45b04417

      MariaDB [test]> flush query_response_time_write;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> 
      MariaDB [test]> show query_response_time_write where Count > 0;
      Empty set (0.001 sec)
       
      MariaDB [test]> show query_response_time_write where Count > 0;
      +----------------+-------+----------------+
      | Time           | Count | Total          |
      +----------------+-------+----------------+
      |       0.001000 |     1 |       0.000506 |
      +----------------+-------+----------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> select count(*) from information_schema.query_response_time;
      +----------+
      | count(*) |
      +----------+
      |       14 |
      +----------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> show query_response_time_write where Count > 0;
      +----------------+-------+----------------+
      | Time           | Count | Total          |
      +----------------+-------+----------------+
      |       0.001000 |     3 |       0.001255 |
      +----------------+-------+----------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> show tables;
      +----------------+
      | Tables_in_test |
      +----------------+
      | t              |
      +----------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> show query_response_time_write where Count > 0;
      +----------------+-------+----------------+
      | Time           | Count | Total          |
      +----------------+-------+----------------+
      |       0.001000 |     5 |       0.002098 |
      +----------------+-------+----------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.