[MDEV-33309] ANALYZE FORMAT=JSON UPDATE|DELETE don't show r_other_time_ms Created: 2024-01-25  Updated: 2024-01-25

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.5, 10.6
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None


 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;


Generated at Thu Feb 08 10:37:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.