mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28926 Add time spent on query optimizer to JSON ANALYZE (#2193)
* Add query optimizer timer to ANALYZE FORMAT=JSON * Adapt tests and results * Change logic to always close the writer after printing query blocks
This commit is contained in:
committed by
Sergei Petrunia
parent
f45f60636f
commit
ad7631bdce
@ -5,6 +5,9 @@ INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|||||||
analyze format=json select * from t0 where a<3;
|
analyze format=json select * from t0 where a<3;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -38,6 +41,9 @@ analyze format=json
|
|||||||
select * from t0, t1 where t1.a=t0.a and t0.a > 9;
|
select * from t0, t1 where t1.a=t0.a and t0.a > 9;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -85,6 +91,9 @@ analyze format=json
|
|||||||
select * from t0, t1 where t1.a=t0.a and t1.b<4;
|
select * from t0, t1 where t1.a=t0.a and t1.b<4;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -135,6 +144,9 @@ analyze format=json
|
|||||||
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60;
|
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -181,6 +193,9 @@ analyze format=json
|
|||||||
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60 and tbl1.c > tbl2.c;
|
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60 and tbl1.c > tbl2.c;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -236,6 +251,9 @@ insert into t2 values (0),(1);
|
|||||||
analyze format=json select * from t1 straight_join t2 force index(a) where t2.a=t1.a;
|
analyze format=json select * from t1 straight_join t2 force index(a) where t2.a=t1.a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -294,6 +312,9 @@ NULL
|
|||||||
analyze format=json select * from test.t1 where t1.a<5;
|
analyze format=json select * from test.t1 where t1.a<5;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -334,6 +355,9 @@ analyze format=json
|
|||||||
update t1 set b=pk;
|
update t1 set b=pk;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -352,6 +376,9 @@ analyze format=json
|
|||||||
select * from t1 where pk < 10 and b > 4;
|
select * from t1 where pk < 10 and b > 4;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -383,6 +410,9 @@ analyze format=json
|
|||||||
delete from t1 where pk < 10 and b > 4;
|
delete from t1 where pk < 10 and b > 4;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -426,6 +456,9 @@ select * from t1, t2 where (t2.key1 between t1.lb1 and t1.rb1) and
|
|||||||
(t2.key3=t1.c1 OR t2.key4=t1.c2);
|
(t2.key3=t1.c1 OR t2.key4=t1.c2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -485,6 +518,9 @@ INSERT INTO t1 select * from t0;
|
|||||||
analyze format=json (select * from t1 tbl1 where a<5) union (select * from t1 tbl2 where a in (2,3));
|
analyze format=json (select * from t1 tbl1 where a<5) union (select * from t1 tbl2 where a in (2,3));
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -561,6 +597,9 @@ insert into t2 select A.a*1000 + B.a, A.a*1000 + B.a from t0 A, t1 B;
|
|||||||
analyze format=json select a, max(b) as TOP from t2 group by a having TOP > a;
|
analyze format=json select a, max(b) as TOP from t2 group by a having TOP > a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -598,6 +637,9 @@ ANALYZE
|
|||||||
analyze format=json select a, max(b) as TOP from t2 group by a having 1<>2;
|
analyze format=json select a, max(b) as TOP from t2 group by a having 1<>2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -634,6 +676,9 @@ ANALYZE
|
|||||||
analyze format=json select a, max(b) as TOP from t2 group by a having 1=2;
|
analyze format=json select a, max(b) as TOP from t2 group by a having 1=2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -645,6 +690,9 @@ ANALYZE
|
|||||||
analyze format=json select a, max(b) as TOP from t2 group by a;
|
analyze format=json select a, max(b) as TOP from t2 group by a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -688,6 +736,9 @@ INSERT INTO t2 VALUES (3),(4);
|
|||||||
ANALYZE FORMAT=JSON SELECT STRAIGHT_JOIN * FROM t1, t2 WHERE b IN ( SELECT a FROM t1 );
|
ANALYZE FORMAT=JSON SELECT STRAIGHT_JOIN * FROM t1, t2 WHERE b IN ( SELECT a FROM t1 );
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -771,6 +822,9 @@ WHERE f3 IN ( 1, 2 )
|
|||||||
GROUP BY sq ORDER BY gc;
|
GROUP BY sq ORDER BY gc;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -888,6 +942,9 @@ create table t2 as select * from t1;
|
|||||||
analyze format=json select a, (select t2.b from t2 where t2.a<t1.a order by t2.c limit 1) from t1 where t1.a<0;
|
analyze format=json select a, (select t2.b from t2 where t2.a<t1.a order by t2.c limit 1) from t1 where t1.a<0;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -35,6 +35,9 @@ analyze format=json
|
|||||||
update t2 set b=b+1 order by b limit 5;
|
update t2 set b=b+1 order by b limit 5;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -89,6 +92,9 @@ analyze format=json
|
|||||||
update t2 set a=a+1 where a<10;
|
update t2 set a=a+1 where a<10;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -137,6 +143,9 @@ analyze format=json
|
|||||||
delete from t2 order by b limit 5;
|
delete from t2 order by b limit 5;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -208,6 +217,9 @@ analyze format=json
|
|||||||
select * from t0,t2 where t2.a=t0.a order by t2.b limit 4;
|
select * from t0,t2 where t2.a=t0.a order by t2.b limit 4;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -308,6 +320,9 @@ analyze format=json
|
|||||||
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
|
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -376,6 +391,9 @@ analyze format=json
|
|||||||
select MAX(b) from t2 where mod(a,2)=0 group by c;
|
select MAX(b) from t2 where mod(a,2)=0 group by c;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -436,6 +454,9 @@ analyze format=json
|
|||||||
select distinct max(t3.b) Q from t0, t3 where t0.a=t3.a group by t0.a order by null;
|
select distinct max(t3.b) Q from t0, t3 where t0.a=t3.a group by t0.a order by null;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -500,6 +521,9 @@ where t5.a=t6.a and t6.b > 0 and t5.a <= 5
|
|||||||
group by t5.a order by sum limit 1;
|
group by t5.a order by sum limit 1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -635,6 +659,9 @@ analyze format=json
|
|||||||
select col1 f1, col2 f2, col1 f3 from t2 group by f1;
|
select col1 f1, col2 f2, col1 f3 from t2 group by f1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -2455,6 +2455,9 @@ select counter+1 from src where counter<10
|
|||||||
) select * from src;
|
) select * from src;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -3861,6 +3864,9 @@ where (dt.a1) in (with recursive cte as (select a2 from t2 where a2='2'
|
|||||||
select a2 from cte);
|
select a2 from cte);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -4120,6 +4126,9 @@ select t1.* from t1, r_cte as r where t1.c = r.a )
|
|||||||
select 0 as b FROM dual union all select b FROM r_cte as t;
|
select 0 as b FROM dual union all select b FROM r_cte as t;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -4285,6 +4294,9 @@ select 0 as b FROM dual union all select b FROM r_cte as t)
|
|||||||
select * from t1 as tt;
|
select * from t1 as tt;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -19643,6 +19643,9 @@ CREATE VIEW v1 AS SELECT a FROM t1 UNION VALUES (3),(4);
|
|||||||
ANALYZE FORMAT=JSON SELECT * from v1 WHERE a=3;
|
ANALYZE FORMAT=JSON SELECT * from v1 WHERE a=3;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -72,6 +72,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b from t1) except (select c,d from t2);
|
ANALYZE format=json (select a,b from t1) except (select c,d from t2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<except1,2>",
|
"table_name": "<except1,2>",
|
||||||
@ -131,6 +134,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) except (select c,d from t2)) a;
|
ANALYZE format=json select * from ((select a,b from t1) except (select c,d from t2)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -336,6 +342,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
|
ANALYZE format=json (select a,b,e,f from t1,t3) except (select c,d,g,h from t2,t4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<except1,2>",
|
"table_name": "<except1,2>",
|
||||||
@ -434,6 +443,9 @@ ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except
|
|||||||
(select c,d,g,h from t2,t4)) a;
|
(select c,d,g,h from t2,t4)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -115,6 +115,9 @@ Note 1003 /* select#1 */ select `a`.`a` AS `a`,`a`.`b` AS `b` from ((/* select#2
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) except all (select c,d from t2)) a;
|
ANALYZE format=json select * from ((select a,b from t1) except all (select c,d from t2)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -196,6 +199,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a from t1) except all (select c from t2)) a;
|
ANALYZE format=json select * from ((select a from t1) except all (select c from t2)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -463,6 +469,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
|
ANALYZE format=json (select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<except1,2>",
|
"table_name": "<except1,2>",
|
||||||
@ -560,6 +569,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
|
ANALYZE format=json select * from ((select a,b,e,f from t1,t3) except all (select c,d,g,h from t2,t4)) t;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -1148,6 +1148,9 @@ EXPLAIN
|
|||||||
analyze format=json select count(distinct b) from t1 group by a;
|
analyze format=json select count(distinct b) from t1 group by a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1446,6 +1449,9 @@ analyze format=json
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -1497,6 +1503,9 @@ analyze format=json
|
|||||||
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
|
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1576,6 +1585,9 @@ analyze format=json
|
|||||||
select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null;
|
select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1664,6 +1676,9 @@ analyze format=json
|
|||||||
select distinct t1.a from t1 join t2 on t2.pk=t1.a;
|
select distinct t1.a from t1 join t2 on t2.pk=t1.a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1770,6 +1785,9 @@ analyze format=json
|
|||||||
select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1);
|
select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -329,6 +329,7 @@ explain
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
explain format=json
|
explain format=json
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -29,6 +29,9 @@ EXPLAIN
|
|||||||
analyze format=json select * from t1 where a in (2,3,4);
|
analyze format=json select * from t1 where a in (2,3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -55,6 +58,9 @@ ANALYZE
|
|||||||
analyze format=json update t1 set a=a+10 where a in (2,3,4);
|
analyze format=json update t1 set a=a+10 where a in (2,3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
@ -76,6 +82,9 @@ ANALYZE
|
|||||||
analyze format=json delete from t1 where a in (20,30,40);
|
analyze format=json delete from t1 where a in (20,30,40);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_total_time_ms": "REPLACED",
|
||||||
|
@ -102,6 +102,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3);
|
ANALYZE format=json (select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<intersect1,2,3>",
|
"table_name": "<intersect1,2,3>",
|
||||||
@ -184,6 +187,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3)) a;
|
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,d from t2) intersect (select e,f from t3)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -388,6 +394,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b from t1) intersect (select c,e from t2,t3);
|
ANALYZE format=json (select a,b from t1) intersect (select c,e from t2,t3);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<intersect1,2>",
|
"table_name": "<intersect1,2>",
|
||||||
@ -466,6 +475,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
|
ANALYZE format=json select * from ((select a,b from t1) intersect (select c,e from t2,t3)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -114,6 +114,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
|
ANALYZE format=json (select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<intersect1,2,3>",
|
"table_name": "<intersect1,2,3>",
|
||||||
@ -196,6 +199,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
|
ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,d from t2) intersect all (select e,f from t3)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -419,6 +425,9 @@ EXPLAIN
|
|||||||
ANALYZE format=json (select a,b from t1) intersect all (select c,e from t2,t3);
|
ANALYZE format=json (select a,b from t1) intersect all (select c,e from t2,t3);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<intersect1,2>",
|
"table_name": "<intersect1,2>",
|
||||||
@ -497,6 +506,9 @@ ANALYZE
|
|||||||
ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
|
ANALYZE format=json select * from ((select a,b from t1) intersect all (select c,e from t2,t3)) a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -3396,6 +3396,9 @@ INSERT INTO t1 SELECT seq,seq from seq_1_to_100;
|
|||||||
ANALYZE FORMAT=JSON SELECT * FROM t1 ORDER BY a LIMIT 5;
|
ANALYZE FORMAT=JSON SELECT * FROM t1 ORDER BY a LIMIT 5;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -3750,6 +3753,9 @@ insert into t1 select seq, seq, seq from seq_1_to_100;
|
|||||||
ANALYZE FORMAT=JSON select * from t1 order by a,b,c;
|
ANALYZE FORMAT=JSON select * from t1 order by a,b,c;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -3913,6 +3919,9 @@ analyze format=json
|
|||||||
select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
|
select a, substr(b, @save_max_sort_length+1) from t1 order by b desc;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -3959,6 +3968,9 @@ insert into t1 values ('def', 4, 4) , ('efg', 5, 5), ('fgh', 6, 6);
|
|||||||
ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
|
ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -4011,6 +4023,9 @@ Warning 1292 Truncated incorrect max_sort_length value: '5'
|
|||||||
ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
|
ANALYZE FORMAT=JSON select a, b, c from t1 order by a, b;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -4077,6 +4092,9 @@ a b
|
|||||||
analyze format=json select * from t1 order by a;
|
analyze format=json select * from t1 order by a;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -4256,6 +4274,9 @@ ANALYZE FORMAT=JSON
|
|||||||
SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
|
SELECT (SELECT sum(t2.b) FROM t2 WHERE t1.b=t2.b GROUP BY t2.a) FROM t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -89,6 +89,9 @@ FROM t3
|
|||||||
GROUP BY x;
|
GROUP BY x;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -250,6 +253,9 @@ FROM t3
|
|||||||
GROUP BY x;
|
GROUP BY x;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -409,6 +415,9 @@ set sort_buffer_size= 2097152;
|
|||||||
ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
|
ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -462,6 +471,9 @@ set sort_buffer_size= 1097152;
|
|||||||
ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
|
ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -113,6 +113,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
l_quantity > 45;
|
l_quantity > 45;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -256,6 +259,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
l_quantity > 45;
|
l_quantity > 45;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -419,6 +425,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -561,6 +570,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -713,6 +725,9 @@ l_quantity > 45 AND
|
|||||||
o_totalprice between 180000 and 230000;
|
o_totalprice between 180000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -881,6 +896,9 @@ l_quantity > 45 AND
|
|||||||
o_totalprice between 180000 and 230000;
|
o_totalprice between 180000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1027,6 +1045,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1195,6 +1216,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1368,6 +1392,9 @@ l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
|
|||||||
o_totalprice BETWEEN 200000 AND 250000;
|
o_totalprice BETWEEN 200000 AND 250000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1502,6 +1529,9 @@ l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
|
|||||||
o_totalprice BETWEEN 200000 AND 250000;
|
o_totalprice BETWEEN 200000 AND 250000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1642,6 +1672,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1777,6 +1810,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1920,6 +1956,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -2065,6 +2104,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -116,6 +116,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
l_quantity > 45;
|
l_quantity > 45;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -259,6 +262,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
l_quantity > 45;
|
l_quantity > 45;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -415,6 +421,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -547,6 +556,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-01-31' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -692,6 +704,9 @@ l_quantity > 45 AND
|
|||||||
o_totalprice between 180000 and 230000;
|
o_totalprice between 180000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -848,6 +863,9 @@ l_quantity > 45 AND
|
|||||||
o_totalprice between 180000 and 230000;
|
o_totalprice between 180000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -987,6 +1005,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1145,6 +1166,9 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND
|
|||||||
o_totalprice between 200000 and 230000;
|
o_totalprice between 200000 and 230000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1319,6 +1343,9 @@ l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
|
|||||||
o_totalprice BETWEEN 200000 AND 250000;
|
o_totalprice BETWEEN 200000 AND 250000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1453,6 +1480,9 @@ l_receiptdate BETWEEN '1996-10-05' AND '1996-10-10' AND
|
|||||||
o_totalprice BETWEEN 200000 AND 250000;
|
o_totalprice BETWEEN 200000 AND 250000;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1593,6 +1623,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1728,6 +1761,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1871,6 +1907,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -2016,6 +2055,9 @@ o_totalprice BETWEEN 200000 AND 220000 AND
|
|||||||
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
l_shipdate BETWEEN '1996-10-01' AND '1996-12-01';
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -3052,6 +3094,9 @@ fi.fh in (6311439873746261694,-397087483897438286,
|
|||||||
8518228073041491534,-5420422472375069774);
|
8518228073041491534,-5420422472375069774);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -400,6 +400,9 @@ ANALYZE format=json
|
|||||||
SELECT 1 FROM t1 GROUP BY convert_tz('1969-12-31 22:00:00',a,'+10:00');
|
SELECT 1 FROM t1 GROUP BY convert_tz('1969-12-31 22:00:00',a,'+10:00');
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -39,6 +39,9 @@ show analyze format=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -69,6 +72,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -100,6 +106,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -138,6 +147,9 @@ show analyze FORMAT= json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -204,6 +216,9 @@ show analyze format=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -271,6 +286,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -340,6 +358,9 @@ show analyze FORMAT=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -415,6 +436,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -472,6 +496,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -535,6 +562,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"nested_loop": [
|
"nested_loop": [
|
||||||
@ -594,6 +624,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -655,6 +688,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -737,6 +773,9 @@ show analyze FORMAT=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -777,6 +816,9 @@ show analyze FORMAT=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -829,6 +871,9 @@ show analyze FORMAT=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -869,6 +914,9 @@ show analyze FORMAT=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -921,6 +969,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -970,6 +1021,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1020,6 +1074,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1084,6 +1141,9 @@ show analyze format=JSON for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1140,6 +1200,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -1186,6 +1249,9 @@ show analyze format=json for $thr2;
|
|||||||
SHOW ANALYZE
|
SHOW ANALYZE
|
||||||
{
|
{
|
||||||
"r_query_time_in_progress_ms": "REPLACED",
|
"r_query_time_in_progress_ms": "REPLACED",
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -2917,6 +2917,9 @@ SELECT DISTINCT
|
|||||||
FROM t1;
|
FROM t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -44,6 +44,9 @@ analyze format=json
|
|||||||
select a, (select d from t2 where b=c) from t1;
|
select a, (select d from t2 where b=c) from t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
@ -98,6 +101,9 @@ analyze format=json
|
|||||||
select a, (select d from t2 where b=c), (select d from t2 where b=c union select 1 order by 1 limit 1) from t1;
|
select a, (select d from t2 where b=c), (select d from t2 where b=c union select 1 order by 1 limit 1) from t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -1667,6 +1667,9 @@ analyze format=json
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -1713,6 +1716,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1747,6 +1753,9 @@ union
|
|||||||
select 1,2;
|
select 1,2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1781,6 +1790,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1828,6 +1840,9 @@ union
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2,3>",
|
"table_name": "<union1,2,3>",
|
||||||
@ -1894,6 +1909,9 @@ union all
|
|||||||
select 1,2;
|
select 1,2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -1924,6 +1942,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1958,6 +1979,9 @@ union all
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -2000,6 +2024,9 @@ union all
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
|
@ -932,6 +932,7 @@ values (1,2);
|
|||||||
analyze
|
analyze
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
@ -952,16 +953,19 @@ values (5,6)
|
|||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2),(3,4)
|
values (1,2),(3,4)
|
||||||
union
|
union
|
||||||
select 1,2;
|
select 1,2;
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (5,6)
|
values (5,6)
|
||||||
union
|
union
|
||||||
@ -974,6 +978,7 @@ values (3,4)
|
|||||||
union
|
union
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
@ -998,16 +1003,19 @@ values (1,2)
|
|||||||
union all
|
union all
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2),(3,4)
|
values (1,2),(3,4)
|
||||||
union all
|
union all
|
||||||
select 1,2;
|
select 1,2;
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2)
|
values (1,2)
|
||||||
union all
|
union all
|
||||||
@ -1020,6 +1028,7 @@ values (3,4)
|
|||||||
union all
|
union all
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union all
|
union all
|
||||||
|
@ -3822,6 +3822,9 @@ INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
|||||||
ANALYZE FORMAT=JSON SELECT row_number() OVER() FROM t1;
|
ANALYZE FORMAT=JSON SELECT row_number() OVER() FROM t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -1665,6 +1665,9 @@ analyze format=json
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -1711,6 +1714,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1745,6 +1751,9 @@ union
|
|||||||
select 1,2;
|
select 1,2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1779,6 +1788,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1826,6 +1838,9 @@ union
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2,3>",
|
"table_name": "<union1,2,3>",
|
||||||
@ -1892,6 +1907,9 @@ union all
|
|||||||
select 1,2;
|
select 1,2;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -1922,6 +1940,9 @@ union
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"table_name": "<union1,2>",
|
"table_name": "<union1,2>",
|
||||||
@ -1956,6 +1977,9 @@ union all
|
|||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
@ -1998,6 +2022,9 @@ union all
|
|||||||
values (1,2);
|
values (1,2);
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"union_result": {
|
"union_result": {
|
||||||
"query_specifications": [
|
"query_specifications": [
|
||||||
|
@ -934,6 +934,7 @@ values (1,2);
|
|||||||
analyze
|
analyze
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
@ -954,16 +955,19 @@ values (5,6)
|
|||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2),(3,4)
|
values (1,2),(3,4)
|
||||||
union
|
union
|
||||||
select 1,2;
|
select 1,2;
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (5,6)
|
values (5,6)
|
||||||
union
|
union
|
||||||
@ -976,6 +980,7 @@ values (3,4)
|
|||||||
union
|
union
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
@ -1000,16 +1005,19 @@ values (1,2)
|
|||||||
union all
|
union all
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2),(3,4)
|
values (1,2),(3,4)
|
||||||
union all
|
union all
|
||||||
select 1,2;
|
select 1,2;
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union
|
union
|
||||||
values (1,2),(3,4);
|
values (1,2),(3,4);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
values (1,2)
|
values (1,2)
|
||||||
union all
|
union all
|
||||||
@ -1022,6 +1030,7 @@ values (3,4)
|
|||||||
union all
|
union all
|
||||||
values (1,2);
|
values (1,2);
|
||||||
|
|
||||||
|
--source include/analyze-format.inc
|
||||||
analyze format=json
|
analyze format=json
|
||||||
select 1,2
|
select 1,2
|
||||||
union all
|
union all
|
||||||
|
@ -3828,6 +3828,9 @@ INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
|||||||
ANALYZE FORMAT=JSON SELECT row_number() OVER() FROM t1;
|
ANALYZE FORMAT=JSON SELECT row_number() OVER() FROM t1;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -117,6 +117,9 @@ ANALYZE FORMAT=JSON
|
|||||||
SELECT id FROM federated.t1 WHERE id < 5;
|
SELECT id FROM federated.t1 WHERE id < 5;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"table": {
|
"table": {
|
||||||
@ -223,6 +226,9 @@ FROM federated.t2 GROUP BY name)) t
|
|||||||
WHERE federated.t3.name=t.name;
|
WHERE federated.t3.name=t.name;
|
||||||
ANALYZE
|
ANALYZE
|
||||||
{
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
"query_block": {
|
"query_block": {
|
||||||
"select_id": 1,
|
"select_id": 1,
|
||||||
"r_loops": 1,
|
"r_loops": 1,
|
||||||
|
@ -47,6 +47,7 @@ Explain_query::Explain_query(THD *thd_arg, MEM_ROOT *root) :
|
|||||||
unions(root), selects(root), stmt_thd(thd_arg), apc_enabled(false),
|
unions(root), selects(root), stmt_thd(thd_arg), apc_enabled(false),
|
||||||
operations(0)
|
operations(0)
|
||||||
{
|
{
|
||||||
|
optimization_time_tracker.start_tracking(stmt_thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_json_array(Json_writer *writer,
|
static void print_json_array(Json_writer *writer,
|
||||||
@ -154,6 +155,8 @@ void Explain_query::add_upd_del_plan(Explain_update *upd_del_plan_arg)
|
|||||||
|
|
||||||
void Explain_query::query_plan_ready()
|
void Explain_query::query_plan_ready()
|
||||||
{
|
{
|
||||||
|
optimization_time_tracker.stop_tracking(stmt_thd);
|
||||||
|
|
||||||
if (!apc_enabled)
|
if (!apc_enabled)
|
||||||
stmt_thd->apc_target.enable();
|
stmt_thd->apc_target.enable();
|
||||||
apc_enabled= true;
|
apc_enabled= true;
|
||||||
@ -256,9 +259,6 @@ int Explain_query::print_explain_json(select_result_sink *output,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
writer.start_object();
|
writer.start_object();
|
||||||
if (is_analyze && query_time_in_progress_ms > 0)
|
|
||||||
writer.add_member("r_query_time_in_progress_ms").
|
|
||||||
add_ull(query_time_in_progress_ms);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If we are printing ANALYZE FORMAT=JSON output, take into account that
|
If we are printing ANALYZE FORMAT=JSON output, take into account that
|
||||||
@ -266,35 +266,74 @@ int Explain_query::print_explain_json(select_result_sink *output,
|
|||||||
sql_explain.h:ExplainDataStructureLifetime for details.
|
sql_explain.h:ExplainDataStructureLifetime for details.
|
||||||
*/
|
*/
|
||||||
if (is_analyze)
|
if (is_analyze)
|
||||||
is_show_cmd= true;
|
|
||||||
|
|
||||||
if (upd_del_plan)
|
|
||||||
upd_del_plan->print_explain_json(this, &writer, is_analyze, is_show_cmd);
|
|
||||||
else if (insert_plan)
|
|
||||||
insert_plan->print_explain_json(this, &writer, is_analyze, is_show_cmd);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/* Start printing from node with id=1 */
|
if (query_time_in_progress_ms > 0){
|
||||||
Explain_node *node= get_node(1);
|
writer.add_member("r_query_time_in_progress_ms").
|
||||||
if (!node)
|
add_ull(query_time_in_progress_ms);
|
||||||
return 1; /* No query plan */
|
|
||||||
node->print_explain_json(this, &writer, is_analyze, is_show_cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_query_optimization_json(&writer);
|
||||||
|
is_show_cmd = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool plan_found = print_query_blocks_json(&writer, is_analyze, is_show_cmd);
|
||||||
|
|
||||||
writer.end_object();
|
writer.end_object();
|
||||||
|
|
||||||
|
if( plan_found )
|
||||||
|
{
|
||||||
|
send_explain_json_to_output(&writer, output);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Explain_query::print_query_optimization_json(Json_writer *writer)
|
||||||
|
{
|
||||||
|
if (optimization_time_tracker.has_timed_statistics())
|
||||||
|
{
|
||||||
|
// if more timers are added, move the query_optimization member
|
||||||
|
// outside the if statement
|
||||||
|
writer->add_member("query_optimization").start_object();
|
||||||
|
writer->add_member("r_total_time_ms").
|
||||||
|
add_double(optimization_time_tracker.get_time_ms());
|
||||||
|
writer->end_object();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Explain_query::print_query_blocks_json(Json_writer *writer,
|
||||||
|
const bool is_analyze,
|
||||||
|
const bool is_show_cmd)
|
||||||
|
{
|
||||||
|
if (upd_del_plan)
|
||||||
|
upd_del_plan->print_explain_json(this, writer, is_analyze, is_show_cmd);
|
||||||
|
else if (insert_plan)
|
||||||
|
insert_plan->print_explain_json(this, writer, is_analyze, is_show_cmd);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Start printing from root node with id=1 */
|
||||||
|
Explain_node *node= get_node(1);
|
||||||
|
if (!node)
|
||||||
|
return false; /* No query plan */
|
||||||
|
node->print_explain_json(this, writer, is_analyze, is_show_cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Explain_query::send_explain_json_to_output(Json_writer *writer,
|
||||||
|
select_result_sink *output)
|
||||||
|
{
|
||||||
CHARSET_INFO *cs= system_charset_info;
|
CHARSET_INFO *cs= system_charset_info;
|
||||||
List<Item> item_list;
|
List<Item> item_list;
|
||||||
const String *buf= writer.output.get_string();
|
const String *buf= writer->output.get_string();
|
||||||
THD *thd= output->thd;
|
THD *thd= output->thd;
|
||||||
item_list.push_back(new (thd->mem_root)
|
item_list.push_back(new (thd->mem_root)
|
||||||
Item_string(thd, buf->ptr(), buf->length(), cs),
|
Item_string(thd, buf->ptr(), buf->length(), cs),
|
||||||
thd->mem_root);
|
thd->mem_root);
|
||||||
output->send_data(item_list);
|
output->send_data(item_list);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool print_explain_for_slow_log(LEX *lex, THD *thd, String *str)
|
bool print_explain_for_slow_log(LEX *lex, THD *thd, String *str)
|
||||||
{
|
{
|
||||||
return lex->explain->print_explain_str(thd, str, /*is_analyze*/ true);
|
return lex->explain->print_explain_str(thd, str, /*is_analyze*/ true);
|
||||||
|
@ -512,6 +512,10 @@ public:
|
|||||||
|
|
||||||
Explain_update *get_upd_del_plan() { return upd_del_plan; }
|
Explain_update *get_upd_del_plan() { return upd_del_plan; }
|
||||||
private:
|
private:
|
||||||
|
bool print_query_blocks_json(Json_writer *writer, const bool is_analyze, const bool is_show_cmd);
|
||||||
|
void print_query_optimization_json(Json_writer *writer);
|
||||||
|
void send_explain_json_to_output(Json_writer *writer, select_result_sink *output);
|
||||||
|
|
||||||
/* Explain_delete inherits from Explain_update */
|
/* Explain_delete inherits from Explain_update */
|
||||||
Explain_update *upd_del_plan;
|
Explain_update *upd_del_plan;
|
||||||
|
|
||||||
@ -533,6 +537,8 @@ private:
|
|||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
bool can_print_json= false;
|
bool can_print_json= false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Exec_time_tracker optimization_time_tracker;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user