1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-30032: EXPLAIN FORMAT=JSON output: print costs

Basic printout for join and table execution costs.
This commit is contained in:
Sergei Petrunia
2022-11-19 21:00:23 +03:00
parent 657868f5e7
commit ffe0beca25
91 changed files with 3441 additions and 18 deletions

View File

@ -680,6 +680,7 @@ group by t11.a;
explain select t1.* from t1 left join v2b on v2b.a=t1.a;
--echo # Check format JSON as well
--source include/explain-no-costs.inc
explain format=JSON select t1.* from t1 left join v2b on t1.a=v2b.a;
--echo # Elimination of a whole subquery
@ -692,6 +693,7 @@ explain select t1.* from t1 left join
explain select t1.* from t1 left join v2b on t1.a=v2b.b;
--echo # Check format JSON as well
--source include/explain-no-costs.inc
explain format=JSON select t1.* from t1 left join v2b on t1.a=v2b.b;
create view v2c as
@ -703,12 +705,14 @@ group by t11.a;
explain select t1.* from t1 left join v2c on v2c.a=t1.a;
--echo # Check format JSON as well
--source include/explain-no-costs.inc
explain format=JSON select t1.* from t1 left join v2c on v2c.a=t1.a;
--echo # In this case v2c cannot be eliminated (since v2c.b is not unique)!
explain select t1.* from t1 left join v2c on t1.a=v2c.b;
--echo # Check format JSON as well
--source include/explain-no-costs.inc
explain format=JSON select t1.* from t1 left join v2c on t1.a=v2c.b;
--echo # Create a view with multiple fields in the GROUP BY clause: