mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-30032: EXPLAIN FORMAT=JSON output: print costs
Basic printout for join and table execution costs.
This commit is contained in:
@ -1920,6 +1920,7 @@ insert into t1 values
|
||||
let $q1=
|
||||
select * from t1 where (a,b) IN ((2, 3),(3,3),(8,8),(7,7));
|
||||
eval explain $q1;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q1;
|
||||
eval $q1;
|
||||
eval prepare stmt from "$q1";
|
||||
@ -1931,6 +1932,7 @@ deallocate prepare stmt;
|
||||
let $q2=
|
||||
select * from t1 where (a,b+a) IN ((4,9),(8,8),(7,7));
|
||||
eval explain $q2;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q2;
|
||||
eval $q2;
|
||||
|
||||
@ -1938,6 +1940,7 @@ eval $q2;
|
||||
let $q3=
|
||||
select * from t1 where (a,b) IN ((4,a-1),(8,a+8),(7,a+7));
|
||||
eval explain $q3;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q3;
|
||||
eval $q3;
|
||||
|
||||
@ -1961,6 +1964,7 @@ let $q4=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((3,3),(7,7),(2,2));
|
||||
eval explain $q4;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q4;
|
||||
eval $q4;
|
||||
|
||||
@ -1986,6 +1990,7 @@ let $q5=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
|
||||
eval explain $q5;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q5;
|
||||
--sorted_result
|
||||
eval $q5;
|
||||
@ -2004,6 +2009,7 @@ let $q6=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
|
||||
eval explain $q6;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q6;
|
||||
--sorted_result
|
||||
eval $q6;
|
||||
@ -2016,6 +2022,7 @@ let $q7=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((4,4),(7,7),(8,8)) and length(f) = 1;
|
||||
eval explain $q7;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q7;
|
||||
eval $q7;
|
||||
|
||||
@ -2025,6 +2032,7 @@ let $q8=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((4,d+1),(7,d+1),(8,d+1)) and length(f) = 1;
|
||||
eval explain $q8;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q8;
|
||||
--sorted_result
|
||||
eval $q8;
|
||||
@ -2035,6 +2043,7 @@ let $q9=
|
||||
select * from t1,t2
|
||||
where a = d and (a,e) in ((e,d+1),(7,7),(8,8)) and length(f) = 1;
|
||||
eval explain $q9;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q9;
|
||||
--sorted_result
|
||||
eval $q9;
|
||||
@ -2046,6 +2055,7 @@ select * from t1,t2
|
||||
where a = d and (a,2) in ((2,2),(7,7),(8,8)) and
|
||||
length(c) = 1 and length(f) = 1;
|
||||
eval explain $q10;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q10;
|
||||
eval $q10;
|
||||
eval prepare stmt from "$q10";
|
||||
@ -2066,6 +2076,7 @@ select * from t1,t2,t3
|
||||
(a,v+1) in ((2,2),(7,7),(8,8)) and
|
||||
length(c) = 1 and length(f) = 1;
|
||||
eval explain $q11;
|
||||
--source include/explain-no-costs.inc
|
||||
eval explain format=json $q11;
|
||||
eval $q11;
|
||||
|
||||
|
Reference in New Issue
Block a user