diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2015-03-07 22:47:28 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2015-03-07 22:47:28 +0300 |
commit | 1626e0d3d48f56bd91239c4fcbc24595ee3a34e3 (patch) | |
tree | 6d92530c4d9c2f47030be63f9cfc851636107ae5 /mysql-test/t/analyze_format_json.test | |
parent | 2288b84df46501b89a70d7dc3b46020e0af9a95e (diff) | |
download | mariadb-git-1626e0d3d48f56bd91239c4fcbc24595ee3a34e3.tar.gz |
MDEV-7648: Extra data in ANALYZE FORMAT=JSON $stmt
Show total execution time (r_total_time_ms) for various parts of the
query:
1. time spent in SELECTs
2. time spent reading rows from storage engines
#2 currently gets the data from P_S.
Diffstat (limited to 'mysql-test/t/analyze_format_json.test')
-rw-r--r-- | mysql-test/t/analyze_format_json.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/analyze_format_json.test b/mysql-test/t/analyze_format_json.test index f57db1d76af..64bafd7ee32 100644 --- a/mysql-test/t/analyze_format_json.test +++ b/mysql-test/t/analyze_format_json.test @@ -9,28 +9,34 @@ create table t0 (a int); INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); --echo # r_filtered=30%, because 3 rows match: 0,1,2 +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t0 where a<3; create table t1 (a int, b int, c int, key(a)); insert into t1 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B; +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze select * from t0, t1 where t1.a=t0.a and t0.a > 9; +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t0, t1 where t1.a=t0.a and t0.a > 9; analyze select * from t0, t1 where t1.a=t0.a and t1.b<4; +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t0, t1 where t1.a=t0.a and t1.b<4; analyze select * from t1 tbl1, t1 tbl2 where tbl1.b<2 and tbl2.b>5; +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60; +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60 and tbl1.c > tbl2.c; @@ -47,6 +53,7 @@ insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t2 (a int, key(a)); insert into t2 values (0),(1); +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from t1 straight_join t2 force index(a) where t2.a=t1.a; drop table t1,t2; @@ -62,6 +69,7 @@ select database(); connect (con1,localhost,root,,*NO-ONE*); connection con1; select database(); +--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ analyze format=json select * from test.t1 where t1.a<5; disconnect con1; connection default; |