mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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. * The advantage of this approach is that it doesn't add any new my_timer_cycles() calls. * The disadvantage is that the definition of what is done during "other time" is not that clear: it includes checking the WHERE (for this table), constructing index lookup tuple (for the next table) writing to GROUP BY temporary table (as we dont account for that time separately [yet], etc)
This commit is contained in:
@ -13,9 +13,9 @@ EXPLAIN extended (select a,b from t1) except (select c,d from t2);
|
||||
EXPLAIN extended select * from ((select a,b from t1) except (select c,d from t2)) a;
|
||||
EXPLAIN format=json (select a,b from t1) except (select c,d from t2);
|
||||
|
||||
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
|
||||
--source include/analyze-format.inc
|
||||
ANALYZE format=json (select a,b from t1) except (select c,d from t2);
|
||||
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
|
||||
--source include/analyze-format.inc
|
||||
ANALYZE format=json select * from ((select a,b from t1) except (select c,d from t2)) a;
|
||||
select * from ((select a,b from t1) except (select c,d from t2)) a;
|
||||
|
||||
@ -45,9 +45,9 @@ EXPLAIN (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
|
||||
EXPLAIN extended select * from ((select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4)) a;
|
||||
EXPLAIN format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
|
||||
|
||||
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
|
||||
--source include/analyze-format.inc
|
||||
ANALYZE format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
|
||||
--replace_regex /"r_total_time_ms": [0-9e\.\-+]*,/"r_total_time_ms": "REPLACED",/
|
||||
--source include/analyze-format.inc
|
||||
ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except
|
||||
(select c,d,g,h from t2,t4)) a;
|
||||
select * from ((select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4)) a;
|
||||
|
Reference in New Issue
Block a user