mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-30032: EXPLAIN FORMAT=JSON output: print costs
Basic printout for join and table execution costs.
This commit is contained in:
@ -51,12 +51,14 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -67,12 +69,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -83,12 +87,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t3",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -115,6 +121,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -125,6 +132,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -138,6 +146,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -148,6 +157,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -161,6 +171,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -171,6 +182,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -192,6 +204,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -202,6 +215,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -217,6 +231,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -227,6 +242,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -240,6 +256,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -250,6 +267,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -263,6 +281,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 4,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -273,6 +292,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -346,12 +366,14 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -362,12 +384,14 @@ EXPLAIN
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
},
|
||||
@ -377,6 +401,7 @@ EXPLAIN
|
||||
"table_name": "t3",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
@ -407,6 +432,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -417,6 +443,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -430,6 +457,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -440,6 +468,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -454,6 +483,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -481,6 +511,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -491,6 +522,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -506,6 +538,7 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -516,6 +549,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -529,6 +563,7 @@ ANALYZE
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"operation": "INTERSECT",
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
@ -539,6 +574,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
@ -553,6 +589,7 @@ ANALYZE
|
||||
"r_loops": 1,
|
||||
"rows": 3,
|
||||
"r_rows": 3,
|
||||
"cost": "REPLACED",
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
|
Reference in New Issue
Block a user