1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -37,12 +37,14 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
}
}
@ -53,12 +55,14 @@ EXPLAIN
"query_block": {
"select_id": 2,
"operation": "EXCEPT",
"cost": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
}
}
@ -85,6 +89,7 @@ ANALYZE
{
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -95,6 +100,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -108,6 +114,7 @@ ANALYZE
"query_block": {
"select_id": 2,
"operation": "EXCEPT",
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -118,6 +125,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -139,6 +147,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -149,6 +158,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 1,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -164,6 +174,7 @@ ANALYZE
{
"query_block": {
"select_id": 2,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -174,6 +185,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -187,6 +199,7 @@ ANALYZE
"query_block": {
"select_id": 3,
"operation": "EXCEPT",
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -197,6 +210,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -281,12 +295,14 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
}
},
@ -296,6 +312,7 @@ EXPLAIN
"table_name": "t3",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
},
"buffer_type": "flat",
@ -310,12 +327,14 @@ EXPLAIN
"query_block": {
"select_id": 2,
"operation": "EXCEPT",
"cost": "REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
}
},
@ -325,6 +344,7 @@ EXPLAIN
"table_name": "t4",
"access_type": "ALL",
"rows": 2,
"cost": "REPLACED",
"filtered": 100
},
"buffer_type": "flat",
@ -355,6 +375,7 @@ ANALYZE
{
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -365,6 +386,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -379,6 +401,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -398,6 +421,7 @@ ANALYZE
"query_block": {
"select_id": 2,
"operation": "EXCEPT",
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -408,6 +432,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -422,6 +447,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -450,6 +476,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -460,6 +487,7 @@ ANALYZE
"r_loops": 1,
"rows": 4,
"r_rows": 3,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -475,6 +503,7 @@ ANALYZE
{
"query_block": {
"select_id": 2,
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -485,6 +514,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -499,6 +529,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -518,6 +549,7 @@ ANALYZE
"query_block": {
"select_id": 3,
"operation": "EXCEPT",
"cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@ -528,6 +560,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@ -542,6 +575,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,