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

@ -29,6 +29,9 @@ EXPLAIN
analyze format=json select * from t1 where a in (2,3,4);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 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
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 1,
"r_total_time_ms": "REPLACED",
@ -76,6 +82,9 @@ ANALYZE
analyze format=json delete from t1 where a in (20,30,40);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"select_id": 1,
"r_total_time_ms": "REPLACED",