1
0
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:
Luis Eduardo Oliveira Lizardo
2022-07-18 17:48:01 +02:00
committed by Sergei Petrunia
parent f45f60636f
commit ad7631bdce
28 changed files with 523 additions and 21 deletions

View File

@ -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
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"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
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 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
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"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
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 1,
"r_loops": 1,