1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -1665,6 +1665,9 @@ analyze format=json
values (1,2);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"query_specifications": [
@@ -1711,6 +1714,9 @@ union
values (1,2),(3,4);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"table_name": "<union1,2>",
@@ -1745,6 +1751,9 @@ union
select 1,2;
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"table_name": "<union1,2>",
@@ -1779,6 +1788,9 @@ union
values (1,2),(3,4);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"table_name": "<union1,2>",
@@ -1826,6 +1838,9 @@ union
values (1,2);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"table_name": "<union1,2,3>",
@@ -1892,6 +1907,9 @@ union all
select 1,2;
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"query_specifications": [
@@ -1922,6 +1940,9 @@ union
values (1,2),(3,4);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"table_name": "<union1,2>",
@@ -1956,6 +1977,9 @@ union all
values (1,2),(3,4);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"query_specifications": [
@@ -1998,6 +2022,9 @@ union all
values (1,2);
ANALYZE
{
"query_optimization": {
"r_total_time_ms": "REPLACED"
},
"query_block": {
"union_result": {
"query_specifications": [