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:
@ -2424,6 +2424,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2434,6 +2435,7 @@ EXPLAIN
|
||||
"key_length": "10",
|
||||
"used_key_parts": ["a", "b"],
|
||||
"rows": 6,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "(t1.a,t1.b) in (<cache>((2,3)),<cache>((3,3)),<cache>((8,8)),<cache>((7,7)))"
|
||||
}
|
||||
@ -2488,6 +2490,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2498,6 +2501,7 @@ EXPLAIN
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 5,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "(t1.a,t1.b + t1.a) in (<cache>((4,9)),<cache>((8,8)),<cache>((7,7)))"
|
||||
}
|
||||
@ -2518,6 +2522,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2528,6 +2533,7 @@ EXPLAIN
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 5,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "(t1.a,t1.b) in ((4,t1.a - 1),(8,t1.a + 8),(7,t1.a + 7))"
|
||||
}
|
||||
@ -2562,6 +2568,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2580,6 +2587,7 @@ EXPLAIN
|
||||
"selectivity_pct": 60
|
||||
},
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 60,
|
||||
"index_condition": "t2.d is not null",
|
||||
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))"
|
||||
@ -2595,6 +2603,7 @@ EXPLAIN
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t2.d"],
|
||||
"rows": 8,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -2648,6 +2657,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2666,6 +2676,7 @@ EXPLAIN
|
||||
"selectivity_pct": 14.42307692
|
||||
},
|
||||
"rows": 8,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 14.42307663,
|
||||
"index_condition": "t2.d is not null",
|
||||
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
|
||||
@ -2681,6 +2692,7 @@ EXPLAIN
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t2.d"],
|
||||
"rows": 8,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 73.17073059
|
||||
}
|
||||
}
|
||||
@ -2759,6 +2771,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2777,6 +2790,7 @@ EXPLAIN
|
||||
"selectivity_pct": 6.730769231
|
||||
},
|
||||
"rows": 7,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 6.730769157,
|
||||
"index_condition": "t2.d is not null",
|
||||
"attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
|
||||
@ -2792,6 +2806,7 @@ EXPLAIN
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t2.d"],
|
||||
"rows": 11,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -2823,6 +2838,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2833,6 +2849,7 @@ EXPLAIN
|
||||
"key_length": "10",
|
||||
"used_key_parts": ["d", "e"],
|
||||
"rows": 5,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"index_condition": "t2.d is not null",
|
||||
"attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
|
||||
@ -2848,6 +2865,7 @@ EXPLAIN
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t2.d"],
|
||||
"rows": 11,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
@ -2878,6 +2896,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2888,6 +2907,7 @@ EXPLAIN
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 15,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"index_condition": "t1.a is not null"
|
||||
}
|
||||
@ -2902,6 +2922,7 @@ EXPLAIN
|
||||
"used_key_parts": ["d"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "(t1.a,t2.e) in ((4,t1.a + 1),(7,t1.a + 1),(8,t1.a + 1)) and octet_length(t2.f) = 1"
|
||||
}
|
||||
@ -2941,6 +2962,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -2948,6 +2970,7 @@ EXPLAIN
|
||||
"access_type": "ALL",
|
||||
"possible_keys": ["idx"],
|
||||
"rows": 144,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "t1.a is not null"
|
||||
}
|
||||
@ -2962,6 +2985,7 @@ EXPLAIN
|
||||
"used_key_parts": ["d"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "(t1.a,t2.e) in ((t2.e,t1.a + 1),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
|
||||
}
|
||||
@ -2995,6 +3019,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -3005,6 +3030,7 @@ EXPLAIN
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 12,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"index_condition": "t1.a is not null",
|
||||
"attached_condition": "(t1.a,2) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1"
|
||||
@ -3020,6 +3046,7 @@ EXPLAIN
|
||||
"used_key_parts": ["d"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "octet_length(t2.f) = 1"
|
||||
}
|
||||
@ -3078,6 +3105,7 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"cost": "COST_REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
@ -3101,6 +3129,7 @@ EXPLAIN
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"rows": 12,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"index_condition": "t1.a is not null",
|
||||
"attached_condition": "(t1.a,1 + 1) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and octet_length(t1.c) = 1"
|
||||
@ -3116,6 +3145,7 @@ EXPLAIN
|
||||
"used_key_parts": ["d"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 3,
|
||||
"cost": "COST_REPLACED",
|
||||
"filtered": 100,
|
||||
"attached_condition": "octet_length(t2.f) = 1"
|
||||
}
|
||||
|
Reference in New Issue
Block a user