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:
@ -63,12 +63,14 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 4,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -79,12 +81,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 4,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -95,12 +99,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t3",
|
||||
"access_type": "ALL",
|
||||
"rows": 4,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -127,6 +133,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -137,6 +144,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -150,6 +158,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -160,6 +169,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -173,6 +183,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -183,6 +194,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -204,6 +216,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -214,6 +227,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -229,6 +243,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -239,6 +254,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -252,6 +268,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -262,6 +279,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -275,6 +293,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 4,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -285,6 +304,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 4,
|
||||
"r_rows": 4,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -377,12 +397,14 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 6,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -393,12 +415,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t3",
|
||||
"access_type": "ALL",
|
||||
"rows": 5,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
},
|
||||
@ -408,6 +432,7 @@ EXPLAIN
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 7,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
@ -438,6 +463,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -448,6 +474,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 6,
|
||||
"r_rows": 6,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -461,6 +488,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -471,6 +499,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 5,
|
||||
"r_rows": 5,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -485,6 +514,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 7,
|
||||
"r_rows": 7,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -512,6 +542,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -522,6 +553,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 6,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -537,6 +569,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -547,6 +580,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 6,
|
||||
"r_rows": 6,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -560,6 +594,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -570,6 +605,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 5,
|
||||
"r_rows": 5,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -584,6 +620,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 7,
|
||||
"r_rows": 7,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
|
Reference in New Issue
Block a user