From 68ed3a81f2113ecdcd5fce0f0cab636d57ff77da Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sat, 9 Nov 2019 21:03:23 +0300 Subject: 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) --- mysql-test/main/except.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/main/except.test') diff --git a/mysql-test/main/except.test b/mysql-test/main/except.test index 97e4ffcc3f2..090826ce94d 100644 --- a/mysql-test/main/except.test +++ b/mysql-test/main/except.test @@ -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; -- cgit v1.2.1