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

@ -737,6 +737,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "COST_REPLACED",
"const_condition": "1",
"nested_loop": [
{
@ -744,6 +745,7 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100
}
}
@ -769,6 +771,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "COST_REPLACED",
"const_condition": "1",
"nested_loop": [
{
@ -776,6 +779,7 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100
}
},
@ -789,11 +793,13 @@ EXPLAIN
"used_key_parts": ["b"],
"ref": ["test.t1.a"],
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "trigcond(t1.a = v2b.b and trigcond(t1.a is not null))",
"materialized": {
"query_block": {
"select_id": 2,
"cost": "COST_REPLACED",
"const_condition": "1",
"filesort": {
"sort_key": "t11.a",
@ -804,6 +810,7 @@ EXPLAIN
"table_name": "t11",
"access_type": "ALL",
"rows": 1000,
"cost": "COST_REPLACED",
"filtered": 100
}
}
@ -831,6 +838,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "COST_REPLACED",
"const_condition": "1",
"nested_loop": [
{
@ -838,6 +846,7 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100
}
}
@ -857,6 +866,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
"cost": "COST_REPLACED",
"const_condition": "1",
"nested_loop": [
{
@ -864,6 +874,7 @@ EXPLAIN
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100
}
},
@ -877,11 +888,13 @@ EXPLAIN
"used_key_parts": ["b"],
"ref": ["test.t1.a"],
"rows": 10,
"cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "trigcond(trigcond(t1.a is not null))",
"materialized": {
"query_block": {
"select_id": 2,
"cost": "COST_REPLACED",
"const_condition": "1",
"filesort": {
"sort_key": "t11.a",
@ -892,6 +905,7 @@ EXPLAIN
"table_name": "t11",
"access_type": "ALL",
"rows": 1000,
"cost": "COST_REPLACED",
"filtered": 100
}
},
@ -905,6 +919,7 @@ EXPLAIN
"used_key_parts": ["pk"],
"ref": ["test.t11.b"],
"rows": 1,
"cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "trigcond(trigcond(t11.b is not null))"
}