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:
@ -1564,6 +1564,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -1589,6 +1590,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 2,
|
||||
"r_rows": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 50,
|
||||
@ -3455,6 +3457,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -3475,6 +3478,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 100,
|
||||
"r_rows": 100,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -3804,6 +3808,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -3824,6 +3829,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 100,
|
||||
"r_rows": 100,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -3970,6 +3976,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -3990,6 +3997,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 5,
|
||||
"r_rows": 5,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4019,6 +4027,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -4039,6 +4048,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 6,
|
||||
"r_rows": 6,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4074,6 +4084,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -4094,6 +4105,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 6,
|
||||
"r_rows": 6,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4143,6 +4155,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -4163,6 +4176,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 10,
|
||||
"r_rows": 10,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4325,6 +4339,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -4335,6 +4350,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 50,
|
||||
"r_rows": 50,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4349,6 +4365,7 @@ ANALYZE
|
||||
"r_hit_ratio": 0,
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 50,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"filesort": {
|
||||
@ -4368,6 +4385,7 @@ ANALYZE
|
||||
"r_loops": 50,
|
||||
"rows": 50,
|
||||
"r_rows": 50,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -4466,6 +4484,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -4476,6 +4495,7 @@ EXPLAIN
|
||||
"key_length": "4",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"using_index": true
|
||||
}
|
||||
@ -4501,6 +4521,7 @@ EXPLAIN
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 97,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "t2.b = 3"
|
||||
}
|
||||
@ -4537,6 +4558,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"read_sorted_file": {
|
||||
@ -4547,6 +4569,7 @@ EXPLAIN
|
||||
"access_type": "ALL",
|
||||
"possible_keys": ["PRIMARY"],
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -4573,6 +4596,7 @@ EXPLAIN
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 97,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "t2.b = 3"
|
||||
}
|
||||
|
Reference in New Issue
Block a user