mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-30032: EXPLAIN FORMAT=JSON output: print costs
Basic printout for join and table execution costs.
This commit is contained in:
@@ -1408,6 +1408,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1423,6 +1424,7 @@ EXPLAIN
|
||||
"table_name": "t0",
|
||||
"access_type": "ALL",
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1443,6 +1445,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"filesort": {
|
||||
"sort_key": "t1.a",
|
||||
"window_functions_computation": {
|
||||
@@ -1460,6 +1463,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1480,6 +1484,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1495,6 +1500,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1517,6 +1523,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"having_condition": "MX in (3,5,7)",
|
||||
"filesort": {
|
||||
"sort_key": "t1.b",
|
||||
@@ -1535,6 +1542,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 10,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1671,6 +1679,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1686,6 +1695,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1703,6 +1713,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1718,6 +1729,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1735,6 +1747,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1750,6 +1763,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1767,6 +1781,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -1782,6 +1797,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1827,6 +1843,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"filesort": {
|
||||
"sort_key": "row_number() over ( order by t1.s1,t1.s2) desc",
|
||||
"window_functions_computation": {
|
||||
@@ -1844,6 +1861,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 6,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -1987,6 +2005,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"duplicate_removal": {
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
@@ -2003,6 +2022,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 9,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -2167,6 +2187,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -2182,6 +2203,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 11,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -2234,6 +2256,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"window_functions_computation": {
|
||||
"sorts": [
|
||||
{
|
||||
@@ -2249,6 +2272,7 @@ EXPLAIN
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 6,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@@ -3833,6 +3857,7 @@ ANALYZE
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "REPLACED",
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"window_functions_computation": {
|
||||
@@ -3858,6 +3883,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