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
@ -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,
|
||||
|
Reference in New Issue
Block a user