summaryrefslogtreecommitdiff
path: root/mysql-test/main/explain_json.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/explain_json.result')
-rw-r--r--mysql-test/main/explain_json.result315
1 files changed, 284 insertions, 31 deletions
diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result
index 3c3c0688ab8..806773d154c 100644
--- a/mysql-test/main/explain_json.result
+++ b/mysql-test/main/explain_json.result
@@ -6,12 +6,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -33,12 +36,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t0.a < 3"
}
@@ -59,12 +65,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t0.a is not null"
}
@@ -78,7 +87,9 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t0.a"],
+ "loops": 10,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -93,6 +104,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -102,7 +114,9 @@ EXPLAIN
"key": "a1",
"key_length": "5",
"used_key_parts": ["a1"],
+ "loops": 1,
"rows": 5,
+ "cost": "COST_REPLACED",
"filtered": 100,
"index_condition": "t2.a1 < 5"
}
@@ -115,6 +129,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -138,7 +153,9 @@ EXPLAIN
}
]
},
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t2.a1 = 1 or t2.b1 = 2"
}
@@ -151,6 +168,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -174,7 +192,9 @@ EXPLAIN
}
]
},
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t2.a1 = 1 or t2.b1 = 2 and t2.b2 = 3"
}
@@ -188,6 +208,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -211,7 +232,9 @@ EXPLAIN
}
]
},
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t2.a1 = 1 and t2.a2 = 1 or t2.b1 = 2 and t2.b2 = 1"
}
@@ -225,12 +248,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t0.a is not null"
}
@@ -244,7 +270,9 @@ EXPLAIN
"key_length": "10",
"used_key_parts": ["b1", "b2"],
"ref": ["test.t0.a", "const"],
+ "loops": 10,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -266,12 +294,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "A",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -282,12 +313,15 @@ EXPLAIN
"query_block": {
"select_id": 2,
"operation": "UNION",
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "B",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -307,12 +341,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "A",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -323,12 +360,15 @@ EXPLAIN
"query_block": {
"select_id": 2,
"operation": "UNION",
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "B",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -349,12 +389,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -365,12 +408,15 @@ EXPLAIN
"state": "uninitialized",
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.b = t0.a"
}
@@ -389,12 +435,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t0.a > (subquery#2) or t0.a < 3"
}
@@ -406,12 +455,15 @@ EXPLAIN
"state": "uninitialized",
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.b = t0.a"
}
@@ -435,12 +487,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "tbl1",
"access_type": "ALL",
+ "loops": 1,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "tbl1.b < 3"
}
@@ -450,7 +505,9 @@ EXPLAIN
"table": {
"table_name": "tbl2",
"access_type": "ALL",
+ "loops": 100,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "tbl2.b < 5"
},
@@ -538,12 +595,15 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -566,17 +626,21 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "tbl.cnt > 0",
"materialized": {
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"having_condition": "cnt > 0",
"filesort": {
"sort_key": "t1.a",
@@ -586,7 +650,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -607,12 +673,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "tbl2",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "tbl2.a is not null"
}
@@ -626,12 +695,15 @@ EXPLAIN
"key_length": "8",
"used_key_parts": ["cnt"],
"ref": ["test.tbl2.a"],
- "rows": 2,
+ "loops": 10,
+ "rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "tbl1.cnt = tbl2.a",
"materialized": {
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"filesort": {
"sort_key": "t1.a",
"temporary_table": {
@@ -640,7 +712,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -663,12 +737,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.a is not null"
}
@@ -682,19 +759,24 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["max(a)"],
"ref": ["test.t1.a"],
+ "loops": 10,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100,
"materialized": {
"unique": 1,
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -713,18 +795,20 @@ EXPLAIN
create table t2 like t1;
insert into t2 select * from t1;
explain format=json
-select * from t1,t2 where t1.a in ( select a from t0);
+select * from t1,t2 where t1.a in ( select seq+0 from seq_1_to_100);
EXPLAIN
{
"query_block": {
"select_id": 1,
- "const_condition": "1",
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -734,11 +818,12 @@ EXPLAIN
"access_type": "eq_ref",
"possible_keys": ["distinct_key"],
"key": "distinct_key",
- "key_length": "4",
- "used_key_parts": ["a"],
+ "key_length": "8",
+ "used_key_parts": ["seq+0"],
"ref": ["func"],
"rows": 1,
"filtered": 100,
+ "attached_condition": "t1.a = seq_1_to_100.seq + 0",
"materialized": {
"unique": 1,
"query_block": {
@@ -746,10 +831,16 @@ EXPLAIN
"nested_loop": [
{
"table": {
- "table_name": "t0",
- "access_type": "ALL",
- "rows": 10,
- "filtered": 100
+ "table_name": "seq_1_to_100",
+ "access_type": "index",
+ "key": "PRIMARY",
+ "key_length": "8",
+ "used_key_parts": ["seq"],
+ "loops": 1,
+ "rows": 100,
+ "cost": "COST_REPLACED",
+ "filtered": 100,
+ "using_index": true
}
}
]
@@ -762,11 +853,13 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 10,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
},
"buffer_type": "flat",
- "buffer_size": "1Kb",
+ "buffer_size": "19Kb",
"join_type": "BNL"
}
}
@@ -787,12 +880,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -801,7 +897,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 10,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"first_match": "t2"
},
@@ -830,12 +928,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -846,8 +947,10 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 10,
"rows": 10,
- "filtered": 100
+ "cost": "COST_REPLACED",
+ "filtered": 10
},
"buffer_type": "flat",
"buffer_size": "206",
@@ -874,6 +977,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -883,7 +987,9 @@ EXPLAIN
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"index_condition": "t1.a < 3",
"mrr_type": "Rowid-ordered scan"
@@ -900,12 +1006,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "tbl1",
"access_type": "ALL",
+ "loops": 1,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -916,7 +1025,9 @@ EXPLAIN
"table_name": "tbl2",
"access_type": "ALL",
"possible_keys": ["a"],
+ "loops": 100,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -930,14 +1041,15 @@ drop table t0;
# MDEV-7265: "Full scan on NULL key", the join case
#
CREATE TABLE t1 (a INT, KEY(a));
-INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t1 VALUES (1),(2),(5),(6),(7);
CREATE TABLE t2 (b INT);
-INSERT INTO t2 VALUES (3),(4);
+INSERT INTO t2 VALUES (3),(4),(9),(10),(11);
EXPLAIN FORMAT=JSON SELECT * FROM t1 AS outer_t1 WHERE a <> ALL ( SELECT a FROM t1, t2 WHERE b <> outer_t1.a );
EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -946,7 +1058,9 @@ EXPLAIN
"key": "a",
"key_length": "5",
"used_key_parts": ["a"],
- "rows": 2,
+ "loops": 1,
+ "rows": 5,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "!<in_optimizer>(outer_t1.a,<exists>(subquery#2))",
"using_index": true
@@ -957,6 +1071,7 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"having_condition": "trigcond(t1.a is null)",
"nested_loop": [
{
@@ -969,7 +1084,9 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["func"],
- "rows": 2,
+ "loops": 1,
+ "rows": 3,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "trigcond(<cache>(outer_t1.a) = t1.a or t1.a is null)",
"using_index": true
@@ -981,7 +1098,9 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
- "rows": 2,
+ "loops": 3,
+ "rows": 5,
+ "cost": "COST_REPLACED",
"filtered": 100
},
"buffer_type": "flat",
@@ -1013,13 +1132,16 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"const_condition": "<not>(<in_optimizer>(20000,<max>(subquery#2) >= 20000))",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1028,12 +1150,15 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "tbl1",
"access_type": "ALL",
+ "loops": 1,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -1042,7 +1167,9 @@ EXPLAIN
"table": {
"table_name": "tbl2",
"access_type": "ALL",
+ "loops": 100,
"rows": 100,
+ "cost": "COST_REPLACED",
"filtered": 100
},
"buffer_type": "flat",
@@ -1071,14 +1198,17 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
- "attached_condition": "!<in_optimizer>(t1.a,t1.a in (subquery#2))"
+ "attached_condition": "!<in_optimizer>(t1.a,<exists>(subquery#2))"
}
}
],
@@ -1086,13 +1216,18 @@ EXPLAIN
{
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
+ "having_condition": "trigcond(t2.b is null)",
"nested_loop": [
{
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
- "filtered": 100
+ "cost": "COST_REPLACED",
+ "filtered": 100,
+ "attached_condition": "trigcond(<cache>(t1.a) = t2.b or t2.b is null)"
}
}
]
@@ -1129,6 +1264,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
@@ -1137,7 +1273,9 @@ EXPLAIN
"key": "a",
"key_length": "10",
"used_key_parts": ["a", "b"],
+ "loops": 1,
"rows": 101,
+ "cost": "COST_REPLACED",
"filtered": 100,
"using_index_for_group_by": true
}
@@ -1153,6 +1291,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
+ "cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@@ -1163,9 +1302,11 @@ ANALYZE
"key": "a",
"key_length": "10",
"used_key_parts": ["a", "b"],
+ "loops": 1,
"r_loops": 1,
"rows": 101,
"r_rows": 100,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1223,26 +1364,35 @@ analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+select count(*) from t1;
+count(*)
+128
explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
+1 SIMPLE t1 range NULL idx_t1_2 147 NULL 17 Using where; Using index for group-by
explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index
+explain select count(distinct a1,a2,b) from t1 where a1 >= "" and (a2 >= 'b') and (b = 'a');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 1 Using where; Using index for group-by
explain format=json select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "range",
- "key": "idx_t1_1",
+ "key": "idx_t1_2",
"key_length": "147",
"used_key_parts": ["a1", "a2", "b"],
+ "loops": 1,
"rows": 17,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.b = 'a' and t1.a2 >= 'b'",
"using_index_for_group_by": true
@@ -1256,17 +1406,46 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
- "access_type": "range",
+ "access_type": "index",
"key": "idx_t1_1",
"key_length": "163",
"used_key_parts": ["a1", "a2", "b", "c"],
- "rows": 65,
- "filtered": 100,
+ "loops": 1,
+ "rows": 128,
+ "cost": "COST_REPLACED",
+ "filtered": 0.198364258,
"attached_condition": "t1.b = 'a' and t1.c = 'i121' and t1.a2 >= 'b'",
+ "using_index": true
+ }
+ }
+ ]
+ }
+}
+explain format=json select count(distinct a1,a2,b) from t1 where a1 >= "" and (a2 >= 'b') and (b = 'a');
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "cost": "COST_REPLACED",
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "range",
+ "possible_keys": ["idx_t1_0", "idx_t1_1", "idx_t1_2"],
+ "key": "idx_t1_1",
+ "key_length": "147",
+ "used_key_parts": ["a1", "a2", "b"],
+ "loops": 1,
+ "rows": 1,
+ "cost": "COST_REPLACED",
+ "filtered": 100,
+ "attached_condition": "t1.b = 'a' and t1.a1 >= '' and t1.a2 >= 'b'",
"using_index_for_group_by": true
}
}
@@ -1284,12 +1463,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.a = _latin1'\xDF'"
}
@@ -1308,12 +1490,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "(case when convert(t1.a using utf8mb3) = <cache>(_utf8mb3'a' collate utf8mb3_bin) then NULL else t1.a end)"
}
@@ -1341,6 +1526,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"having_condition": "TOP > t2.a",
"filesort": {
"sort_key": "t2.a",
@@ -1350,7 +1536,9 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 256,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1365,6 +1553,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"filesort": {
"sort_key": "t2.a",
"temporary_table": {
@@ -1373,7 +1562,9 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 256,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1399,6 +1590,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"filesort": {
"sort_key": "t2.a",
"temporary_table": {
@@ -1407,7 +1599,9 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 1,
"rows": 256,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1468,7 +1662,7 @@ insert into t2 values (1),(2);
explain
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const PRIMARY NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 const PRIMARY NULL NULL NULL 0 Impossible ON condition
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
explain format=json
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
@@ -1476,6 +1670,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"const_condition": "1",
"nested_loop": [
{
@@ -1483,8 +1678,8 @@ EXPLAIN
"table_name": "t2",
"access_type": "const",
"possible_keys": ["PRIMARY"],
- "rows": 1,
- "filtered": 100,
+ "rows": 0,
+ "filtered": 0,
"impossible_on_condition": true
}
},
@@ -1492,7 +1687,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1508,6 +1705,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
+ "cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"const_condition": "1",
@@ -1518,9 +1716,9 @@ ANALYZE
"access_type": "const",
"possible_keys": ["PRIMARY"],
"r_loops": 0,
- "rows": 1,
+ "rows": 0,
"r_rows": null,
- "filtered": 100,
+ "filtered": 0,
"r_filtered": null,
"impossible_on_condition": true
}
@@ -1529,9 +1727,11 @@ ANALYZE
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"r_loops": 1,
"rows": 2,
"r_rows": 2,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1553,12 +1753,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -1571,7 +1774,9 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["pk"],
"ref": ["test.t1.a"],
+ "loops": 2,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "trigcond(t2.pk is null) and trigcond(trigcond(t1.a is not null))",
"using_index": true,
@@ -1590,6 +1795,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
+ "cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@@ -1597,9 +1803,11 @@ ANALYZE
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"r_loops": 1,
"rows": 2,
"r_rows": 2,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1615,9 +1823,11 @@ ANALYZE
"key_length": "4",
"used_key_parts": ["pk"],
"ref": ["test.t1.a"],
+ "loops": 2,
"r_loops": 2,
"rows": 1,
"r_rows": 1,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1642,13 +1852,16 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.a is not null"
}
@@ -1662,7 +1875,9 @@ EXPLAIN
"key_length": "4",
"used_key_parts": ["pk"],
"ref": ["test.t1.a"],
+ "loops": 2,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100,
"using_index": true,
"distinct": true
@@ -1681,6 +1896,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
+ "cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"temporary_table": {
@@ -1689,9 +1905,11 @@ ANALYZE
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"r_loops": 1,
"rows": 2,
"r_rows": 2,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1708,9 +1926,11 @@ ANALYZE
"key_length": "4",
"used_key_parts": ["pk"],
"ref": ["test.t1.a"],
+ "loops": 2,
"r_loops": 2,
"rows": 1,
"r_rows": 1,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1748,12 +1968,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t3",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t3.a is not null"
}
@@ -1768,7 +1991,9 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t3.a"],
+ "loops": 10,
"rows": 1,
+ "cost": "COST_REPLACED",
"filtered": 100,
"index_condition_bka": "t4.b + 1 <= t3.b + 1"
},
@@ -1790,6 +2015,7 @@ ANALYZE
},
"query_block": {
"select_id": 1,
+ "cost": "REPLACED",
"r_loops": 1,
"r_total_time_ms": "REPLACED",
"nested_loop": [
@@ -1797,9 +2023,11 @@ ANALYZE
"table": {
"table_name": "t3",
"access_type": "ALL",
+ "loops": 1,
"r_loops": 1,
"rows": 10,
"r_rows": 10,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1817,9 +2045,11 @@ ANALYZE
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t3.a"],
+ "loops": 10,
"r_loops": 1,
"rows": 1,
"r_rows": 10,
+ "cost": "REPLACED",
"r_table_time_ms": "REPLACED",
"r_other_time_ms": "REPLACED",
"filtered": 100,
@@ -1830,7 +2060,8 @@ ANALYZE
"buffer_size": "400",
"join_type": "BKA",
"mrr_type": "Rowid-ordered scan",
- "r_filtered": 100
+ "r_filtered": 100,
+ "r_unpack_time_ms": "REPLACED"
}
}
]
@@ -1852,12 +2083,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1868,13 +2102,16 @@ EXPLAIN
"state": "uninitialized",
"query_block": {
"select_id": 2,
+ "cost": "COST_REPLACED",
"outer_ref_condition": "t0.a < 5",
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 10,
+ "cost": "COST_REPLACED",
"filtered": 100,
"attached_condition": "t1.b < t0.a"
}
@@ -1897,6 +2134,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"read_sorted_file": {
@@ -1905,7 +2143,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 3,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1919,6 +2159,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"read_sorted_file": {
@@ -1927,7 +2168,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 3,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1941,6 +2184,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"read_sorted_file": {
@@ -1949,7 +2193,9 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
+ "loops": 1,
"rows": 3,
+ "cost": "COST_REPLACED",
"filtered": 100
}
}
@@ -1971,12 +2217,15 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "cost": "COST_REPLACED",
"nested_loop": [
{
"table": {
"table_name": "t0",
"access_type": "ALL",
+ "loops": 1,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100
}
},
@@ -1987,7 +2236,9 @@ EXPLAIN
"table": {
"table_name": "t2",
"access_type": "ALL",
+ "loops": 2,
"rows": 2,
+ "cost": "COST_REPLACED",
"filtered": 100
},
"buffer_type": "flat",
@@ -2001,8 +2252,10 @@ EXPLAIN
"table": {
"table_name": "t3",
"access_type": "ALL",
+ "loops": 4,
"rows": 2,
- "filtered": 100
+ "cost": "COST_REPLACED",
+ "filtered": 25
},
"buffer_type": "incremental",
"buffer_size": "109",