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

ANALYZE FORMAT=JSON UPDATE|DELETE don't show r_other_time_ms

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • UPDATE/DELETE of single table queries would now show r_table_time_ms, and r_other_time_ms during ANALYZE FORMAT=JSON
    • Q4/2025 Server Maintenance

    Description

      ANALYZE FORMAT=JSON UPDATE/DELETE don't show r_table_time_ms or r_other_time_ms. It shows r_total_time_ms.

      Apparently they don't use Gap_time_tracker. The fix

      commit 68ed3a81f2113ecdcd5fce0f0cab636d57ff77da
      Author: Sergei Petrunia <psergey@askmonty.org>
      Date:   Sat Nov 9 21:03:23 2019 +0300
       
          MDEV-20854: ANALYZE for statements: not clear where the time is spent
          
          Count the "gap" time between table accesses and display it as
          r_other_time_ms in the "table" element.
      

      didn't cover UPDATE/DELETE.

      Testcase:

      create table t1 (pk int primary key, a int);
      insert into t1 select seq, seq from seq_1_to_1000;
      create table t2 like t1;
      insert into t2 select * from t1;
      analyze format=json update t1 set a=a+1 where t1.pk > (select max(a) from t2 where t2.pk+1 = t1.pk+1 ) -10;
      

      Attachments

        Activity

          People

            bsrikanth Srikanth Bondalapati
            psergei Sergei Petrunia
            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.