From 058367fb6141c4b00067a779961216684c01efc7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 2 Dec 2019 13:33:56 +0100 Subject: [PATCH 1/6] Bug #30471809: SERVER CRASH WITH SELECT FROM INFORMATION SCHEMA TABLES Remove the hash_join=off optimizer switch; it causes problems with certain information schema views, and it will go away anyway shortly, when the pre-iterator executor (and thus also BNL) is removed. Change-Id: I3779fbc6be57e7fcf6533a32d538cabf3941e5f4 --- mysql-test/r/hash_join.result | 32 -------------------------- mysql-test/r/kill.result | 2 +- mysql-test/r/temptable_disk.result | 7 ++---- mysql-test/r/temptable_fallback.result | 8 +++---- mysql-test/t/hash_join.test | 18 --------------- mysql-test/t/kill.test | 2 +- mysql-test/t/temptable_disk.test | 7 ++---- mysql-test/t/temptable_fallback.test | 8 +++---- sql/filesort.cc | 5 ++++ sql/sql_join_buffer.cc | 6 ----- 10 files changed, 19 insertions(+), 76 deletions(-) diff --git a/mysql-test/r/hash_join.result b/mysql-test/r/hash_join.result index 8fbed21c1c1..4ae0237675e 100644 --- a/mysql-test/r/hash_join.result +++ b/mysql-test/r/hash_join.result @@ -916,38 +916,6 @@ SET join_buffer_size = 1024; SELECT STRAIGHT_JOIN COUNT(*) FROM t1 JOIN t2 ON t1.col1 = t2.col1; DROP TABLE t1, t2; SET join_buffer_size = DEFAULT; -# See that the hints for hash join works as expected. -CREATE TABLE t1 (col1 INTEGER); -CREATE TABLE t2 (col1 INTEGER); -# By default, hash join should be used. -EXPLAIN FORMAT=tree SELECT t1.col1 FROM t1, t2; -EXPLAIN --> Inner hash join (cost=0.70 rows=1) - -> Table scan on t2 (cost=0.35 rows=1) - -> Hash - -> Table scan on t1 (cost=0.35 rows=1) - -# Try disabling hash join using the hint. -EXPLAIN FORMAT=tree SELECT /*+ NO_HASH_JOIN(t1, t2) */ t1.col1 FROM t1, t2; -EXPLAIN - - -# Turn off hash join using the optimizer switch, and then enable it again -# using the hint. -SET optimizer_switch="hash_join=off"; -EXPLAIN FORMAT=tree SELECT t1.col1 FROM t1, t2; -EXPLAIN - - -EXPLAIN FORMAT=tree SELECT /*+ HASH_JOIN(t1, t2) */ t1.col1 FROM t1, t2; -EXPLAIN --> Inner hash join (cost=0.70 rows=1) - -> Table scan on t2 (cost=0.35 rows=1) - -> Hash - -> Table scan on t1 (cost=0.35 rows=1) - -SET optimizer_switch=DEFAULT; -DROP TABLE t1, t2; # # Bug#29964536 WL#2241: ASSERTION FAILURE IN # TEMPTABLE::HANDLER::POSITION() AT SRC/HANDLER.CC diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index a325f1b2369..718a60032e7 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -53,7 +53,7 @@ INSERT INTO t2 SELECT id FROM t1; SET DEBUG_SYNC= 'thread_end SIGNAL con1_end'; SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync'; SELECT id FROM t1 WHERE id IN -(SELECT /*+ NO_HASH_JOIN(a,b,c,d) */ DISTINCT a.id FROM t2 a, t2 b, t2 c, t2 d +(SELECT /*+ NO_BNL(a,b,c,d) */ DISTINCT a.id FROM t2 a, t2 b, t2 c, t2 d GROUP BY ACOS(1/a.id), b.id, c.id, d.id HAVING a.id BETWEEN 10 AND 20); SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; diff --git a/mysql-test/r/temptable_disk.result b/mysql-test/r/temptable_disk.result index 4d9e3fb02d6..ed57099b73b 100644 --- a/mysql-test/r/temptable_disk.result +++ b/mysql-test/r/temptable_disk.result @@ -49,7 +49,7 @@ SET @@global.temptable_use_mmap = true; SELECT @@global.temptable_use_mmap; @@global.temptable_use_mmap 1 -CREATE TABLE t (c VARCHAR(128)); +CREATE TABLE t (c LONGBLOB); INSERT INTO t VALUES (REPEAT('a', 128)), (REPEAT('b', 128)), @@ -59,10 +59,7 @@ ANALYZE TABLE t; Table Op Msg_type Msg_text test.t analyze status OK SET GLOBAL temptable_max_ram = 2097152; -# Disable hash join, since that will trigger the new execution engine, -# which in turn won't do the temporary materialization needed to trigger -# overflow to disk. -SELECT /*+ NO_HASH_JOIN(t1, t2, t3, t4, t5, t6) */ * FROM +SELECT * FROM t AS t1, t AS t2, t AS t3, diff --git a/mysql-test/r/temptable_fallback.result b/mysql-test/r/temptable_fallback.result index 31989cf6bd7..a3ac12a691a 100644 --- a/mysql-test/r/temptable_fallback.result +++ b/mysql-test/r/temptable_fallback.result @@ -1,7 +1,7 @@ -# Disable hash join for this test, as it will trigger the new executor. -# The new executor will enable the StreamingIterator in many of the test -# cases, resulting in fewer materializations. -SET optimizer_switch="hash_join=off"; +# Disable sorting by addon fields, as that will enable the +# StreamingIterator in many of the test cases, resulting in +# fewer materializations. +SET debug = '+d,filesort_force_sort_row_ids'; CREATE TABLE t (c VARCHAR(128)); INSERT INTO t VALUES (REPEAT('a', 128)), diff --git a/mysql-test/t/hash_join.test b/mysql-test/t/hash_join.test index 3f45a8b5f3a..e08b24fec41 100644 --- a/mysql-test/t/hash_join.test +++ b/mysql-test/t/hash_join.test @@ -649,24 +649,6 @@ eval $query; DROP TABLE t1, t2; SET join_buffer_size = DEFAULT; ---echo # See that the hints for hash join works as expected. -CREATE TABLE t1 (col1 INTEGER); -CREATE TABLE t2 (col1 INTEGER); - ---echo # By default, hash join should be used. -EXPLAIN FORMAT=tree SELECT t1.col1 FROM t1, t2; - ---echo # Try disabling hash join using the hint. -EXPLAIN FORMAT=tree SELECT /*+ NO_HASH_JOIN(t1, t2) */ t1.col1 FROM t1, t2; - ---echo # Turn off hash join using the optimizer switch, and then enable it again ---echo # using the hint. -SET optimizer_switch="hash_join=off"; -EXPLAIN FORMAT=tree SELECT t1.col1 FROM t1, t2; -EXPLAIN FORMAT=tree SELECT /*+ HASH_JOIN(t1, t2) */ t1.col1 FROM t1, t2; -SET optimizer_switch=DEFAULT; -DROP TABLE t1, t2; - --echo # --echo # Bug#29964536 WL#2241: ASSERTION FAILURE IN --echo # TEMPTABLE::HANDLER::POSITION() AT SRC/HANDLER.CC diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index a0898fcb40c..302a2497ba0 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -129,7 +129,7 @@ SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync'; # 'before_acos_function', because the hash join iterator will materialize a lot # of data before we get so far. send SELECT id FROM t1 WHERE id IN - (SELECT /*+ NO_HASH_JOIN(a,b,c,d) */ DISTINCT a.id FROM t2 a, t2 b, t2 c, t2 d + (SELECT /*+ NO_BNL(a,b,c,d) */ DISTINCT a.id FROM t2 a, t2 b, t2 c, t2 d GROUP BY ACOS(1/a.id), b.id, c.id, d.id HAVING a.id BETWEEN 10 AND 20); diff --git a/mysql-test/t/temptable_disk.test b/mysql-test/t/temptable_disk.test index 2575c793b52..a1d91645adc 100644 --- a/mysql-test/t/temptable_disk.test +++ b/mysql-test/t/temptable_disk.test @@ -69,7 +69,7 @@ SELECT @@global.temptable_use_mmap; # Test TempTable overflow to disk # -CREATE TABLE t (c VARCHAR(128)); +CREATE TABLE t (c LONGBLOB); # Forces use of temporary table in filesort. INSERT INTO t VALUES (REPEAT('a', 128)), @@ -81,10 +81,7 @@ ANALYZE TABLE t; SET GLOBAL temptable_max_ram = 2097152; -- disable_result_log ---echo # Disable hash join, since that will trigger the new execution engine, ---echo # which in turn won't do the temporary materialization needed to trigger ---echo # overflow to disk. -SELECT /*+ NO_HASH_JOIN(t1, t2, t3, t4, t5, t6) */ * FROM +SELECT * FROM t AS t1, t AS t2, t AS t3, diff --git a/mysql-test/t/temptable_fallback.test b/mysql-test/t/temptable_fallback.test index 94d6937e36b..2d27e1c5748 100644 --- a/mysql-test/t/temptable_fallback.test +++ b/mysql-test/t/temptable_fallback.test @@ -8,10 +8,10 @@ # Prepare # ---echo # Disable hash join for this test, as it will trigger the new executor. ---echo # The new executor will enable the StreamingIterator in many of the test ---echo # cases, resulting in fewer materializations. -SET optimizer_switch="hash_join=off"; +--echo # Disable sorting by addon fields, as that will enable the +--echo # StreamingIterator in many of the test cases, resulting in +--echo # fewer materializations. +SET debug = '+d,filesort_force_sort_row_ids'; CREATE TABLE t (c VARCHAR(128)); diff --git a/sql/filesort.cc b/sql/filesort.cc index f3e1f249380..23ef8184405 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -166,6 +166,11 @@ void Sort_param::decide_addon_fields(Filesort *file_sort, TABLE *table, return; } + DBUG_EXECUTE_IF("filesort_force_sort_row_ids", { + m_addon_fields_status = Addon_fields_status::keep_rowid; + return; + }); + // Generally, prefer using addon fields (ie., sorting rows instead of just // row IDs) if we can. // diff --git a/sql/sql_join_buffer.cc b/sql/sql_join_buffer.cc index 76c4fe9b60f..3f4052ffe4c 100644 --- a/sql/sql_join_buffer.cc +++ b/sql/sql_join_buffer.cc @@ -673,12 +673,6 @@ int JOIN_CACHE_BNL::init() { } bool JOIN_CACHE_BNL::can_be_replaced_with_hash_join() const { - if (!hint_table_state(join->thd, qep_tab->table_ref, HASH_JOIN_HINT_ENUM, - OPTIMIZER_SWITCH_HASH_JOIN)) { - // Disabled by optimizer switch. - return false; - } - if (qep_tab->last_inner() != NO_PLAN_IDX) { // Outer join. return false; From b782bbba2c50ac7a11b4e850c4a79f12f19e6035 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Mon, 15 Jul 2019 13:34:31 +0200 Subject: [PATCH 2/6] Bug#13960580 SUBQUERY MATERIALIZATION IS TOO RESTRICTIVE ON DATA TYPES Subquery materialization used to require inner and outer types to match, now let's allow _some_ cases of difference: - ok if inner is numeric (as there's a well-defined way to cast the outer to a number) - otherwise, require same collation, and: - ok if inner is temporal (as there's a well-defined way to cast the outer to a temporal) - ok if two strings. So, compared to before, we have relaxed numbers, BIT and temporal. The motivation is that an INT could be compared to a SUM of INT (which is a DECIMAL) without resorting to IN-to-EXISTS. Another motivation is to make decisions simpler to anticipate, for the user and us devs. A new test file is added, based on Harsha's previous patches. It compares combinations of types when used with an equi-join and when used with IN(subquery). Results have been validated against trunk, we only have EXPLAIN changes, showing that subq-mat and semijoin-mat are used more often. One exception: compared to trunk, the queries which look up a TIME into an indexed TIMESTAMP now give a good result, because they now use subquery materialization, while IN-to-EXISTS has a bug (bug 75644). opt_hints_subquery: changed test to maintain intention. Approved by: Roy Lyseng Change-Id: Ia7af06f74ea0ca1f16040195952d7fb1fe9e4153 --- mysql-test/r/opt_hints_subquery.result | 8 +- mysql-test/r/subquery_mat.result | 8 +- mysql-test/r/subquery_mat_all.result | 8 +- mysql-test/r/subquery_mat_mixed_types.result | 9785 +++++++++++++++++ mysql-test/r/subquery_sj_all.result | 4 +- mysql-test/r/subquery_sj_all_bka.result | 4 +- .../r/subquery_sj_all_bka_nixbnl.result | 4 +- mysql-test/r/subquery_sj_all_bkaunique.result | 4 +- mysql-test/r/subquery_sj_mat.result | 4 +- mysql-test/r/subquery_sj_mat_bka.result | 4 +- .../r/subquery_sj_mat_bka_nixbnl.result | 4 +- mysql-test/r/subquery_sj_mat_bkaunique.result | 4 +- mysql-test/r/subquery_sj_mat_nosj.result | 4 +- mysql-test/t/opt_hints_subquery.test | 4 +- mysql-test/t/subquery_mat_mixed_types.test | 127 + sql/opt_range.cc | 2 +- sql/sql_optimizer.cc | 10 +- sql/sql_select.cc | 61 +- 18 files changed, 10000 insertions(+), 49 deletions(-) create mode 100644 mysql-test/r/subquery_mat_mixed_types.result create mode 100644 mysql-test/t/subquery_mat_mixed_types.test diff --git a/mysql-test/r/opt_hints_subquery.result b/mysql-test/r/opt_hints_subquery.result index bdbb02f26f4..94246d389df 100644 --- a/mysql-test/r/opt_hints_subquery.result +++ b/mysql-test/r/opt_hints_subquery.result @@ -1649,21 +1649,21 @@ Note 1003 /* select#1 */ select /*+ SUBQUERY(@`subq` MATERIALIZATION) */ `test`. This query does not support Subquery Materialization due to type mismatch EXPLAIN SELECT * FROM t2 -WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ sum(b) FROM t1 group by a); +WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ concat(sum(b),"") FROM t1 group by a); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 NULL index NULL a 4 NULL 4 100.00 Using where; Using index 2 DEPENDENT SUBQUERY t1 NULL index PRIMARY PRIMARY 4 NULL 4 100.00 NULL Warnings: -Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(/* select#2 */ select /*+ QB_NAME(`subq`) */ 1 from `test`.`t1` group by `test`.`t1`.`a` having ((`test`.`t2`.`a`) = (sum(`test`.`t1`.`b`))))) +Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(/* select#2 */ select /*+ QB_NAME(`subq`) */ 1 from `test`.`t1` group by `test`.`t1`.`a` having ((`test`.`t2`.`a`) = (concat(sum(`test`.`t1`.`b`),''))))) Trying to force Subquery Materialization will not change anything EXPLAIN SELECT /*+ SUBQUERY(@subq MATERIALIZATION) */ * FROM t2 -WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ sum(b) FROM t1 group by a); +WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ concat(sum(b),"") FROM t1 group by a); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 NULL index NULL a 4 NULL 4 100.00 Using where; Using index 2 DEPENDENT SUBQUERY t1 NULL index PRIMARY PRIMARY 4 NULL 4 100.00 NULL Warnings: -Note 1003 /* select#1 */ select /*+ SUBQUERY(@`subq` MATERIALIZATION) */ `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(/* select#2 */ select /*+ QB_NAME(`subq`) */ 1 from `test`.`t1` group by `test`.`t1`.`a` having ((`test`.`t2`.`a`) = (sum(`test`.`t1`.`b`))))) +Note 1003 /* select#1 */ select /*+ SUBQUERY(@`subq` MATERIALIZATION) */ `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(/* select#2 */ select /*+ QB_NAME(`subq`) */ 1 from `test`.`t1` group by `test`.`t1`.`a` having ((`test`.`t2`.`a`) = (concat(sum(`test`.`t1`.`b`),''))))) Test hints with prepared statements PREPARE stmt1 FROM "EXPLAIN SELECT /*+ SUBQUERY(@subq1 MATERIALIZATION) diff --git a/mysql-test/r/subquery_mat.result b/mysql-test/r/subquery_mat.result index 938a062778c..8a534bdd043 100644 --- a/mysql-test/r/subquery_mat.result +++ b/mysql-test/r/subquery_mat.result @@ -503,12 +503,16 @@ explain select * from t1 group by (a1 in (select col from columns)); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using temporary -2 DEPENDENT SUBQUERY columns NULL unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index; Full scan on NULL key +2 SUBQUERY columns NULL index PRIMARY PRIMARY 4 NULL 2 100.00 Using index Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` group by (`test`.`t1`.`a1`,(((`test`.`t1`.`a1`) in columns on PRIMARY where (outer_field_is_not_null, ((`test`.`t1`.`a1`) = `test`.`columns`.`col`), true)))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` group by (`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( (/* select#2 */ select `test`.`columns`.`col` from `test`.`columns` where true ), (`test`.`t1`.`a1` in on where ((`test`.`t1`.`a1` = `materialized-subquery`.`col`))))) select * from t1 group by (a1 in (select col from columns)); a1 a2 1 - 00 2 - 00 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '1 - 00' +Warning 1292 Truncated incorrect DOUBLE value: '1 - 01' +Warning 1292 Truncated incorrect DOUBLE value: '1 - 02' /* ORDER BY clause */ explain select * from t1 order by (select col from columns limit 1); diff --git a/mysql-test/r/subquery_mat_all.result b/mysql-test/r/subquery_mat_all.result index c7282a19ee3..a0b12bebadd 100644 --- a/mysql-test/r/subquery_mat_all.result +++ b/mysql-test/r/subquery_mat_all.result @@ -503,12 +503,16 @@ explain select * from t1 group by (a1 in (select col from columns)); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using temporary -2 DEPENDENT SUBQUERY columns NULL unique_subquery PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index; Full scan on NULL key +2 SUBQUERY columns NULL index PRIMARY PRIMARY 4 NULL 2 100.00 Using index Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` group by (`test`.`t1`.`a1`,(((`test`.`t1`.`a1`) in columns on PRIMARY where (outer_field_is_not_null, ((`test`.`t1`.`a1`) = `test`.`columns`.`col`), true)))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` group by (`test`.`t1`.`a1`,`test`.`t1`.`a1` in ( (/* select#2 */ select `test`.`columns`.`col` from `test`.`columns` where true ), (`test`.`t1`.`a1` in on where ((`test`.`t1`.`a1` = `materialized-subquery`.`col`))))) select * from t1 group by (a1 in (select col from columns)); a1 a2 1 - 00 2 - 00 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '1 - 00' +Warning 1292 Truncated incorrect DOUBLE value: '1 - 01' +Warning 1292 Truncated incorrect DOUBLE value: '1 - 02' /* ORDER BY clause */ explain select * from t1 order by (select col from columns limit 1); diff --git a/mysql-test/r/subquery_mat_mixed_types.result b/mysql-test/r/subquery_mat_mixed_types.result new file mode 100644 index 00000000000..965b1f6aefa --- /dev/null +++ b/mysql-test/r/subquery_mat_mixed_types.result @@ -0,0 +1,9785 @@ +# +# Bug#13960580 SUBQUERY MATERIALIZATION IS TOO RESTRICTIVE ON DATA TYPES +# +CREATE TABLE t1 (c1 INT, KEY(c1)); +CREATE TABLE t2 (c1 BIGINT, KEY(c1)); +CREATE TABLE t3 (c1 DECIMAL(5,2), KEY(c1)); +CREATE TABLE t4 (c1 FLOAT, KEY(c1)); +CREATE TABLE t5 (c1 DOUBLE, KEY(c1)); +CREATE TABLE t6 (c1 CHAR(60), KEY(c1)); +CREATE TABLE t7 (c1 VARCHAR(60), KEY(c1)); +CREATE TABLE t8 (c1 TIME, KEY(c1)); +CREATE TABLE t9 (c1 TIMESTAMP, KEY(c1)); +CREATE TABLE t10 (c1 DATE, KEY(c1)); +CREATE TABLE t11 (c1 DATETIME, KEY(c1)); +CREATE TABLE t12 (c1 CHAR(5) CHARACTER SET UTF16, KEY(c1)); +CREATE TABLE t13 (c1 BIGINT UNSIGNED, KEY(c1)); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (64); +INSERT INTO t2 VALUES (3), (9), (64), (-1), (-64); +INSERT INTO t3 VALUES (3.0), (10.0), (64.0), (64.1); +INSERT INTO t4 VALUES (3.3), (9.9), (64e0), (64.1e0); +INSERT INTO t5 VALUES (3.3), (9.9), (64e0), (64.1e0); +INSERT INTO t6 VALUES ('11'), ('21'), ('3'), ('64'), ('64.1'); +INSERT INTO t7 VALUES ('11'), ('21'), ('3'), ('64'), ('64.1'); +INSERT INTO t8 VALUES ('10:22:33'), ('12:34:56'), ('33:22:33'); +INSERT INTO t9 VALUES (20150413102233), (19990102123456); +INSERT INTO t10 VALUES ('1998-01-01'), ('2015-04-13'); +INSERT INTO t11 VALUES ('1999-08-14 01:00:00'), ('2015-04-13 10:22:33'), +('2015-04-14 09:22:33'); +INSERT INTO t12 VALUES ('11'), ('3'), ('21'), ('64'), ('64.1'); +INSERT INTO t13 VALUES (64),(18446744073709551615); +ANALYZE TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +test.t4 analyze status OK +test.t5 analyze status OK +test.t6 analyze status OK +test.t7 analyze status OK +test.t8 analyze status OK +test.t9 analyze status OK +test.t10 analyze status OK +test.t11 analyze status OK +test.t12 analyze status OK +test.t13 analyze status OK +set optimizer_switch='semijoin=off,materialization=on,subquery_materialization_cost_based=off'; +SET TIMESTAMP=UNIX_TIMESTAMP(20150413000000); +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE t1.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE t1.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t3 WHERE t1.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t3 WHERE t1.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t4 WHERE t1.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t4 WHERE t1.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t5 WHERE t1.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t5 WHERE t1.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t6 WHERE t1.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t6 WHERE t1.c1=t6.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index +3 DEPENDENT SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t7 WHERE t1.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t7 WHERE t1.c1=t7.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index +3 DEPENDENT SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t8 WHERE t1.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t8 WHERE t1.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t9 WHERE t1.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t9 WHERE t1.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index +3 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t10 WHERE t1.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t10 WHERE t1.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index +3 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t11 WHERE t1.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t11 WHERE t1.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index +3 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t12 WHERE t1.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t12 WHERE t1.c1=t12.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t13 WHERE t1.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t13 WHERE t1.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t1 WHERE t2.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t1 WHERE t2.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t3 WHERE t2.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t3 WHERE t2.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t4 WHERE t2.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t4 WHERE t2.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t5 WHERE t2.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t5 WHERE t2.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t6 WHERE t2.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t6 WHERE t2.c1=t6.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t7 WHERE t2.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t7 WHERE t2.c1=t7.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t8 WHERE t2.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t8 WHERE t2.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t9 WHERE t2.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t9 WHERE t2.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t10 WHERE t2.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t10 WHERE t2.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t11 WHERE t2.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t11 WHERE t2.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t12 WHERE t2.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t12 WHERE t2.c1=t12.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t13 WHERE t2.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t13 WHERE t2.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t1 WHERE t3.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t1 WHERE t3.c1=t1.c1; +c1 c1 +3.00 3 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3.00 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3.00 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t2 WHERE t3.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t2 WHERE t3.c1=t2.c1; +c1 c1 +3.00 3 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3.00 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3.00 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t4 WHERE t3.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t4 WHERE t3.c1=t4.c1; +c1 c1 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t5 WHERE t3.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t5 WHERE t3.c1=t5.c1; +c1 c1 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t6 WHERE t3.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t6 WHERE t3.c1=t6.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t7 WHERE t3.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t7 WHERE t3.c1=t7.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t8 WHERE t3.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t8 WHERE t3.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t9 WHERE t3.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t9 WHERE t3.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t10 WHERE t3.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t10 WHERE t3.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t11 WHERE t3.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t11 WHERE t3.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t12 WHERE t3.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t12 WHERE t3.c1=t12.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t13 WHERE t3.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t13 WHERE t3.c1=t13.c1; +c1 c1 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t1 WHERE t4.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t1 WHERE t4.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t2 WHERE t4.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t2 WHERE t4.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t3 WHERE t4.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t3 WHERE t4.c1=t3.c1; +c1 c1 +64 64.00 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t5 WHERE t4.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t5 WHERE t4.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t6 WHERE t4.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t6 WHERE t4.c1=t6.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t7 WHERE t4.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t7 WHERE t4.c1=t7.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t8 WHERE t4.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t8 WHERE t4.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t9 WHERE t4.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t9 WHERE t4.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t10 WHERE t4.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t10 WHERE t4.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t11 WHERE t4.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t11 WHERE t4.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t12 WHERE t4.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t12 WHERE t4.c1=t12.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t13 WHERE t4.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t13 WHERE t4.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t1 WHERE t5.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t1 WHERE t5.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t2 WHERE t5.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t2 WHERE t5.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t3 WHERE t5.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t3 WHERE t5.c1=t3.c1; +c1 c1 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t4 WHERE t5.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t4 WHERE t5.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t6 WHERE t5.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t6 WHERE t5.c1=t6.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t7 WHERE t5.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t7 WHERE t5.c1=t7.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t8 WHERE t5.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t8 WHERE t5.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t9 WHERE t5.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t9 WHERE t5.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t10 WHERE t5.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t10 WHERE t5.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t11 WHERE t5.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t11 WHERE t5.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t12 WHERE t5.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t12 WHERE t5.c1=t12.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t13 WHERE t5.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t13 WHERE t5.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t1 WHERE t6.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t1 WHERE t6.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t2 WHERE t6.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t2 WHERE t6.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t3 WHERE t6.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t3 WHERE t6.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t4 WHERE t6.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t4 WHERE t6.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t5 WHERE t6.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t5 WHERE t6.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t7 WHERE t6.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t7 NULL ref c1 c1 243 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t7 WHERE t6.c1=t7.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t8 WHERE t6.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t8 WHERE t6.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t9 WHERE t6.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t9 WHERE t6.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t10 WHERE t6.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t10 WHERE t6.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t11 WHERE t6.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t11 WHERE t6.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t12 WHERE t6.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t6 STRAIGHT_JOIN t12 WHERE t6.c1=t12.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t13 WHERE t6.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t13 WHERE t6.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t1 WHERE t7.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t1 WHERE t7.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t2 WHERE t7.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t2 WHERE t7.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t3 WHERE t7.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t3 WHERE t7.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t4 WHERE t7.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t4 WHERE t7.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t5 WHERE t7.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t5 WHERE t7.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t6 WHERE t7.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t6 NULL ref c1 c1 241 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t6 WHERE t7.c1=t6.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t8 WHERE t7.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t8 WHERE t7.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t9 WHERE t7.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t9 WHERE t7.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t10 WHERE t7.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t10 WHERE t7.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t11 WHERE t7.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t11 WHERE t7.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index +3 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t12 WHERE t7.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t7 STRAIGHT_JOIN t12 WHERE t7.c1=t12.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t13 WHERE t7.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t13 WHERE t7.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t1 WHERE t8.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t1 WHERE t8.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t2 WHERE t8.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t2 WHERE t8.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t3 WHERE t8.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t3 WHERE t8.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t4 WHERE t8.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t4 WHERE t8.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t5 WHERE t8.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t5 WHERE t8.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t6 WHERE t8.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t8 STRAIGHT_JOIN t6 WHERE t8.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t7 WHERE t8.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t8 STRAIGHT_JOIN t7 WHERE t8.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +c1 c1 +10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +c1 +10:22:33 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +10:22:33 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t10 WHERE t8.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t10 WHERE t8.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t11 WHERE t8.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t11 WHERE t8.c1=t11.c1; +c1 c1 +10:22:33 2015-04-13 10:22:33 +33:22:33 2015-04-14 09:22:33 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t11); +c1 +10:22:33 +33:22:33 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +10:22:33 +33:22:33 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t12 WHERE t8.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t12 WHERE t8.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t13 WHERE t8.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t13 WHERE t8.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t1 WHERE t9.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t1 WHERE t9.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t2 WHERE t9.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t2 WHERE t9.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t3 WHERE t9.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t3 WHERE t9.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t4 WHERE t9.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t4 WHERE t9.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t5 WHERE t9.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t5 WHERE t9.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t6 WHERE t9.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t6 WHERE t9.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t7 WHERE t9.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t7 WHERE t9.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +c1 c1 +2015-04-13 10:22:33 10:22:33 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t10 WHERE t9.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t10 WHERE t9.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t11 WHERE t9.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t11 WHERE t9.c1=t11.c1; +c1 c1 +2015-04-13 10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t11); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t12 WHERE t9.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t12 WHERE t9.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t13 WHERE t9.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t13 WHERE t9.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t1 WHERE t10.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t1 WHERE t10.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t2 WHERE t10.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t2 WHERE t10.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t3 WHERE t10.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t3 WHERE t10.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t4 WHERE t10.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t4 WHERE t10.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t5 WHERE t10.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t5 WHERE t10.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t6 WHERE t10.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t6 WHERE t10.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t7 WHERE t10.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t7 WHERE t10.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t8 WHERE t10.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t8 WHERE t10.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t9 WHERE t10.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t9 WHERE t10.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t11 WHERE t10.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t11 WHERE t10.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t12 WHERE t10.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t12 WHERE t10.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t13 WHERE t10.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t13 WHERE t10.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t1 WHERE t11.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t1 WHERE t11.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t2 WHERE t11.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t2 WHERE t11.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t3 WHERE t11.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t3 WHERE t11.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t4 WHERE t11.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t4 WHERE t11.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t5 WHERE t11.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t5 WHERE t11.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t6 WHERE t11.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t6 WHERE t11.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t7 WHERE t11.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t7 WHERE t11.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t8 WHERE t11.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t8 WHERE t11.c1=t8.c1; +c1 c1 +2015-04-13 10:22:33 10:22:33 +2015-04-14 09:22:33 33:22:33 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +2015-04-14 09:22:33 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +2015-04-14 09:22:33 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t9 WHERE t11.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t9 WHERE t11.c1=t9.c1; +c1 c1 +2015-04-13 10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t9); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +2015-04-13 10:22:33 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t10 WHERE t11.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t10 WHERE t11.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index +3 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t12 WHERE t11.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t12 WHERE t11.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t13 WHERE t11.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t13 WHERE t11.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 DEPENDENT SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t1 WHERE t12.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t1 WHERE t12.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t2 WHERE t12.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t2 WHERE t12.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t3 WHERE t12.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t3 WHERE t12.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t4 WHERE t12.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t4 WHERE t12.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t5 WHERE t12.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t5 WHERE t12.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t6 WHERE t12.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t6 WHERE t12.c1=t6.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t7 WHERE t12.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t7 WHERE t12.c1=t7.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t8 WHERE t12.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t8 WHERE t12.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t9 WHERE t12.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t9 WHERE t12.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t10 WHERE t12.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t10 WHERE t12.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t11 WHERE t12.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t11 WHERE t12.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t13 WHERE t12.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t13 WHERE t12.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 SUBQUERY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t1 WHERE t13.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t1 WHERE t13.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 SUBQUERY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t2 WHERE t13.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t2 WHERE t13.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 SUBQUERY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t3 WHERE t13.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t3 WHERE t13.c1=t3.c1; +c1 c1 +64 64.00 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 SUBQUERY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t4 WHERE t13.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t4 WHERE t13.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 SUBQUERY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t5 WHERE t13.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t5 WHERE t13.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 SUBQUERY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t6 WHERE t13.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t6 WHERE t13.c1=t6.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t7 WHERE t13.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t7 WHERE t13.c1=t7.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t8 WHERE t13.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t8 WHERE t13.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t9 WHERE t13.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t9 WHERE t13.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t10 WHERE t13.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t10 WHERE t13.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t11 WHERE t13.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t11 WHERE t13.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t12 WHERE t13.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t12 WHERE t13.c1=t12.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL Not optimized, outer query is empty +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +SET TIMESTAMP=UNIX_TIMESTAMP(20140413000000); +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +2 SUBQUERY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +c1 +set optimizer_switch='semijoin=on,firstmatch=off,loosescan=off,duplicateweedout=off,materialization=on,subquery_materialization_cost_based=on'; +SET TIMESTAMP=UNIX_TIMESTAMP(20150413000000); +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE t1.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t2 WHERE t1.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t1.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t3 WHERE t1.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t3 WHERE t1.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t1.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t4 WHERE t1.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t4 WHERE t1.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t1.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t5 WHERE t1.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t5 WHERE t1.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t1.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t6 WHERE t1.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t6 WHERE t1.c1=t6.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t7 WHERE t1.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t7 WHERE t1.c1=t7.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t8 WHERE t1.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t8 WHERE t1.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t9 WHERE t1.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t9 WHERE t1.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t10 WHERE t1.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t10 WHERE t1.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t11 WHERE t1.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t11 WHERE t1.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t12 WHERE t1.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t1 STRAIGHT_JOIN t12 WHERE t1.c1=t12.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t1 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t13 WHERE t1.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL index c1 c1 5 NULL 6 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t1.c1 1 100.00 Using where; Using index +SELECT * FROM t1 STRAIGHT_JOIN t13 WHERE t1.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL ALL NULL NULL NULL NULL NULL 100.00 Using where +1 SIMPLE t1 NULL ref c1 c1 5 .c1 1 100.00 Using where; Using index +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t1 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index c1 c1 5 NULL 6 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t1 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index +SELECT 1 FROM t1 WHERE (SELECT 1 FROM t1 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t1 WHERE t2.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t1 WHERE t2.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t2.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t3 WHERE t2.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t3 WHERE t2.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t2.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t4 WHERE t2.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t4 WHERE t2.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t2.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t5 WHERE t2.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t5 WHERE t2.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t2.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t6 WHERE t2.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t6 WHERE t2.c1=t6.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t7 WHERE t2.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t7 WHERE t2.c1=t7.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t8 WHERE t2.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t8 WHERE t2.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t9 WHERE t2.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t9 WHERE t2.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t10 WHERE t2.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t10 WHERE t2.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t11 WHERE t2.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t11 WHERE t2.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t12 WHERE t2.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t2 STRAIGHT_JOIN t12 WHERE t2.c1=t12.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t2 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t2 STRAIGHT_JOIN t13 WHERE t2.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL index c1 c1 9 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t2.c1 1 100.00 Using where; Using index +SELECT * FROM t2 STRAIGHT_JOIN t13 WHERE t2.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL ALL NULL NULL NULL NULL NULL 100.00 Using where +1 SIMPLE t2 NULL ref c1 c1 9 .c1 1 100.00 Using where; Using index +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t2 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index c1 c1 9 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t2 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t2 WHERE (SELECT 1 FROM t2 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t1 WHERE t3.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t1 WHERE t3.c1=t1.c1; +c1 c1 +3.00 3 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t3.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3.00 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3.00 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t2 WHERE t3.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t2 WHERE t3.c1=t2.c1; +c1 c1 +3.00 3 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t3.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3.00 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3.00 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t4 WHERE t3.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t4 WHERE t3.c1=t4.c1; +c1 c1 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t3.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t5 WHERE t3.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t5 WHERE t3.c1=t5.c1; +c1 c1 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t3.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t6 WHERE t3.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t6 WHERE t3.c1=t6.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t6); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t7 WHERE t3.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t7 WHERE t3.c1=t7.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t7); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t8 WHERE t3.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t8 WHERE t3.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t9 WHERE t3.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t9 WHERE t3.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t9.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t10 WHERE t3.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t10 WHERE t3.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t10.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t11 WHERE t3.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t11 WHERE t3.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t11.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t12 WHERE t3.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t3 STRAIGHT_JOIN t12 WHERE t3.c1=t12.c1; +c1 c1 +3.00 3 +64.00 64 +64.10 64.1 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t3 NULL ref c1 c1 4 test.t12.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t12); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +3.00 +64.00 +64.10 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t3 STRAIGHT_JOIN t13 WHERE t3.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t3 NULL index c1 c1 4 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t3.c1 1 100.00 Using where; Using index +SELECT * FROM t3 STRAIGHT_JOIN t13 WHERE t3.c1=t13.c1; +c1 c1 +64.00 64 +EXPLAIN SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL ALL NULL NULL NULL NULL NULL 100.00 Using where +1 SIMPLE t3 NULL ref c1 c1 4 .c1 1 100.00 Using where; Using index +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t3 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64.00 +EXPLAIN SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index c1 c1 4 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t3 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64.00 +EXPLAIN SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t3 WHERE (SELECT 1 FROM t3 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t1 WHERE t4.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t1 WHERE t4.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t4.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t2 WHERE t4.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t2 WHERE t4.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t4.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t3 WHERE t4.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t3 WHERE t4.c1=t3.c1; +c1 c1 +64 64.00 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t4.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t5 WHERE t4.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t5 WHERE t4.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t4.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t6 WHERE t4.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t6 WHERE t4.c1=t6.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t7 WHERE t4.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t7 WHERE t4.c1=t7.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t8 WHERE t4.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t8 WHERE t4.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t9 WHERE t4.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t9 WHERE t4.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t10 WHERE t4.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t10 WHERE t4.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t11 WHERE t4.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t11 WHERE t4.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t12 WHERE t4.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t4 STRAIGHT_JOIN t12 WHERE t4.c1=t12.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t4 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t4 STRAIGHT_JOIN t13 WHERE t4.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t4 NULL index c1 c1 5 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t4.c1 1 100.00 Using where; Using index +SELECT * FROM t4 STRAIGHT_JOIN t13 WHERE t4.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL ALL NULL NULL NULL NULL NULL 100.00 Using where +1 SIMPLE t4 NULL ref c1 c1 5 .c1 1 100.00 Using where; Using index +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t4 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index c1 c1 5 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t4 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t4 WHERE (SELECT 1 FROM t4 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t1 WHERE t5.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t1 WHERE t5.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t5.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t2 WHERE t5.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t2 WHERE t5.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t5.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t3 WHERE t5.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t3 WHERE t5.c1=t3.c1; +c1 c1 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t5.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t4 WHERE t5.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t4 WHERE t5.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t5.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t6 WHERE t5.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t6 WHERE t5.c1=t6.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t7 WHERE t5.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t7 WHERE t5.c1=t7.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t8 WHERE t5.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t8 WHERE t5.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t9 WHERE t5.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t9 WHERE t5.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index c1 c1 5 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t10 WHERE t5.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t10 WHERE t5.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index c1 c1 4 NULL 2 50.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t11 WHERE t5.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t11 WHERE t5.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index c1 c1 6 NULL 3 33.33 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t12 WHERE t5.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t5 STRAIGHT_JOIN t12 WHERE t5.c1=t12.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index; Start temporary +1 SIMPLE t5 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t5 STRAIGHT_JOIN t13 WHERE t5.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t5 NULL index c1 c1 9 NULL 4 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t5.c1 1 100.00 Using where; Using index +SELECT * FROM t5 STRAIGHT_JOIN t13 WHERE t5.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL ALL NULL NULL NULL NULL NULL 100.00 Using where +1 SIMPLE t5 NULL ref c1 c1 9 .c1 1 100.00 Using where; Using index +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t5 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index c1 c1 9 NULL 4 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t5 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index +SELECT 1 FROM t5 WHERE (SELECT 1 FROM t5 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t1 WHERE t6.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t1 WHERE t6.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t2 WHERE t6.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t2 WHERE t6.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t3 WHERE t6.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t3 WHERE t6.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t4 WHERE t6.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t4 WHERE t6.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t5 WHERE t6.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t5 WHERE t6.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t7 WHERE t6.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t7 NULL ref c1 c1 243 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t7 WHERE t6.c1=t7.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 243 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t7 NULL index c1 c1 243 NULL 5 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index_subquery c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t8 WHERE t6.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t8 WHERE t6.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t9 WHERE t6.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t9 WHERE t6.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t10 WHERE t6.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t10 WHERE t6.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t11 WHERE t6.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t11 WHERE t6.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t12 WHERE t6.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t6 STRAIGHT_JOIN t12 WHERE t6.c1=t12.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index; Start temporary +1 SIMPLE t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t6 STRAIGHT_JOIN t13 WHERE t6.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t6.c1 1 100.00 Using where; Using index +SELECT * FROM t6 STRAIGHT_JOIN t13 WHERE t6.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t6.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t6 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index c1 c1 241 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t6 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t6 WHERE (SELECT 1 FROM t6 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t1 WHERE t7.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t1 WHERE t7.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t2 WHERE t7.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t2 WHERE t7.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t3 WHERE t7.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t3 WHERE t7.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t4 WHERE t7.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t4 WHERE t7.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t5 WHERE t7.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t5 WHERE t7.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t6 WHERE t7.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t6 NULL ref c1 c1 241 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t6 WHERE t7.c1=t6.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 241 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t6 NULL index c1 c1 241 NULL 5 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index_subquery c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t8 WHERE t7.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t8 WHERE t7.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t9 WHERE t7.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t9 WHERE t7.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t10 WHERE t7.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t10 WHERE t7.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t11 WHERE t7.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t11 WHERE t7.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +1 +1 +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t12 WHERE t7.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using index +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t7 STRAIGHT_JOIN t12 WHERE t7.c1=t12.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index; Start temporary +1 SIMPLE t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t7 STRAIGHT_JOIN t13 WHERE t7.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t7.c1 1 100.00 Using where; Using index +SELECT * FROM t7 STRAIGHT_JOIN t13 WHERE t7.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t7.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t7 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index c1 c1 243 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t7 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t7 WHERE (SELECT 1 FROM t7 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t1 WHERE t8.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t1 WHERE t8.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t2 WHERE t8.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t2 WHERE t8.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t3 WHERE t8.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t3 WHERE t8.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t4 WHERE t8.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t4 WHERE t8.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t5 WHERE t8.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t5 WHERE t8.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t6 WHERE t8.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t8 STRAIGHT_JOIN t6 WHERE t8.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t7 WHERE t8.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t8 STRAIGHT_JOIN t7 WHERE t8.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +c1 c1 +10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +c1 +10:22:33 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t10 WHERE t8.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t10 WHERE t8.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t11 WHERE t8.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t11 WHERE t8.c1=t11.c1; +c1 c1 +10:22:33 2015-04-13 10:22:33 +33:22:33 2015-04-14 09:22:33 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 6 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t11); +c1 +10:22:33 +33:22:33 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t12 WHERE t8.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t12 WHERE t8.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t13 WHERE t8.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t13 WHERE t8.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index c1 c1 4 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t8 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT 1 FROM t8 WHERE (SELECT 1 FROM t8 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t1 WHERE t9.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t1 WHERE t9.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t2 WHERE t9.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t2 WHERE t9.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t3 WHERE t9.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t3 WHERE t9.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t4 WHERE t9.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t4 WHERE t9.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t5 WHERE t9.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t5 WHERE t9.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t6 WHERE t9.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t6 WHERE t9.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t7 WHERE t9.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t7 WHERE t9.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +c1 c1 +2015-04-13 10:22:33 10:22:33 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t10 WHERE t9.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t10 WHERE t9.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t11 WHERE t9.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t11 WHERE t9.c1=t11.c1; +c1 c1 +2015-04-13 10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 6 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t11); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t12 WHERE t9.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t12 WHERE t9.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t13 WHERE t9.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t9.c1 1 100.00 Using where; Using index +SELECT * FROM t9 STRAIGHT_JOIN t13 WHERE t9.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t9.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index c1 c1 5 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t9 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t9 WHERE (SELECT 1 FROM t9 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t1 WHERE t10.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t1 WHERE t10.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t2 WHERE t10.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t2 WHERE t10.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t3 WHERE t10.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t3 WHERE t10.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t4 WHERE t10.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t4 WHERE t10.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t5 WHERE t10.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t5 WHERE t10.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t6 WHERE t10.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t6 WHERE t10.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t7 WHERE t10.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t7 WHERE t10.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t8 WHERE t10.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t10 STRAIGHT_JOIN t8 WHERE t10.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t9 WHERE t10.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t9 WHERE t10.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t11 WHERE t10.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t11 WHERE t10.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 6 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t11 NULL index c1 c1 6 NULL 3 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +1 +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t12 WHERE t10.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t12 WHERE t10.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t10 STRAIGHT_JOIN t13 WHERE t10.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t10.c1 1 100.00 Using where; Using index +SELECT * FROM t10 STRAIGHT_JOIN t13 WHERE t10.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index c1 c1 4 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t10.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t10 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index c1 c1 4 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t10 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t10 WHERE (SELECT 1 FROM t10 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t1 WHERE t11.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t1 WHERE t11.c1=t1.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t1); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL index NULL c1 5 NULL 6 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t2 WHERE t11.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t2 WHERE t11.c1=t2.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t2); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 NULL index NULL c1 9 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t3 WHERE t11.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t3 WHERE t11.c1=t3.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t3); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 NULL index NULL c1 4 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t4 WHERE t11.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t4 WHERE t11.c1=t4.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t4); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t4 NULL index NULL c1 5 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t5 WHERE t11.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t5 WHERE t11.c1=t5.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t5); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t5 NULL index NULL c1 9 NULL 4 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t6 WHERE t11.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t6 WHERE t11.c1=t6.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t6); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t6 NULL index NULL c1 241 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t7 WHERE t11.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t7 WHERE t11.c1=t7.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t7); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t7 NULL index NULL c1 243 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t8 WHERE t11.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t11 STRAIGHT_JOIN t8 WHERE t11.c1=t8.c1; +c1 c1 +2015-04-13 10:22:33 10:22:33 +2015-04-14 09:22:33 33:22:33 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index; Start temporary +1 SIMPLE t11 NULL ref c1 c1 6 test.t8.c1 1 100.00 Using where; Using index; End temporary +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +2015-04-14 09:22:33 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +2015-04-13 10:22:33 +2015-04-14 09:22:33 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t9 WHERE t11.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t9 WHERE t11.c1=t9.c1; +c1 c1 +2015-04-13 10:22:33 2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t9); +c1 +2015-04-13 10:22:33 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +2015-04-13 10:22:33 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t10 WHERE t11.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t10 WHERE t11.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t10 NULL index c1 c1 4 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +1 +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t12 WHERE t11.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t12 WHERE t11.c1=t12.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using index +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t12); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t11 STRAIGHT_JOIN t13 WHERE t11.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t11.c1 1 100.00 Using where; Using index +SELECT * FROM t11 STRAIGHT_JOIN t13 WHERE t11.c1=t13.c1; +c1 c1 +EXPLAIN SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index c1 c1 6 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t11.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t11 WHERE c1 IN (SELECT c1 FROM t13); +c1 +EXPLAIN SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t11 NULL index c1 c1 6 NULL 3 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t11 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index; Start temporary; End temporary +1 PRIMARY t11 NULL index NULL c1 6 NULL 2 100.00 Using index; Using join buffer (Block Nested Loop) +2 SUBQUERY t11 NULL index NULL c1 6 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t11 WHERE (SELECT 1 FROM t11 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +INSERT INTO t11 SET c1='2015-04-14 09:22:33'; +ANALYZE TABLE t11; +Table Op Msg_type Msg_text +test.t11 analyze status OK +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t1 WHERE t12.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t1 WHERE t12.c1=t1.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t2 WHERE t12.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t2 WHERE t12.c1=t2.c1; +c1 c1 +3 3 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +3 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t3 WHERE t12.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t3 WHERE t12.c1=t3.c1; +c1 c1 +3 3.00 +64 64.00 +64.1 64.10 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t4 WHERE t12.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t4 WHERE t12.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t5 WHERE t12.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t5 WHERE t12.c1=t5.c1; +c1 c1 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t6 WHERE t12.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t6 WHERE t12.c1=t6.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL ref c1 c1 241 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t7 WHERE t12.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t7 WHERE t12.c1=t7.c1; +c1 c1 +11 11 +21 21 +3 3 +64 64 +64.1 64.1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index NULL c1 21 NULL 5 100.00 Using index +1 SIMPLE t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL ref c1 c1 243 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +11 +21 +3 +64 +64.1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t8 WHERE t12.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t8 WHERE t12.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index NULL c1 4 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index NULL c1 4 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t9 WHERE t12.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t9 WHERE t12.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index NULL c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index NULL c1 5 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t10 WHERE t12.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t10 WHERE t12.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t10 NULL index NULL c1 4 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index NULL c1 4 NULL 2 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t11 WHERE t12.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using index +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t12 STRAIGHT_JOIN t11 WHERE t12.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t11 NULL index NULL c1 6 NULL 3 100.00 Using index; Start temporary +1 SIMPLE t12 NULL ref c1 c1 21 func 1 100.00 Using where; Using index; End temporary +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index NULL c1 6 NULL 3 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t12 STRAIGHT_JOIN t13 WHERE t12.c1=t13.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE t13 NULL ref c1 c1 9 test.t12.c1 1 100.00 Using where; Using index +SELECT * FROM t12 STRAIGHT_JOIN t13 WHERE t12.c1=t13.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t12.c1 1 100.00 Using where +2 MATERIALIZED t13 NULL index c1 c1 9 NULL 2 100.00 Using index +SELECT * FROM t12 WHERE c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t12 NULL index c1 c1 21 NULL 5 100.00 Using index +2 DEPENDENT SUBQUERY t13 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t12 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t13); +c1 +64 +EXPLAIN SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t12 NULL index NULL c1 21 NULL 5 100.00 Using where; Using index +SELECT 1 FROM t12 WHERE (SELECT 1 FROM t12 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t13 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t1 WHERE t13.c1=t1.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t1 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t1 WHERE t13.c1=t1.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t13.c1 1 100.00 Using where +2 MATERIALIZED t1 NULL index c1 c1 5 NULL 6 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t1 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t1); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t1 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t2 WHERE t13.c1=t2.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t2 NULL ref c1 c1 9 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t2 WHERE t13.c1=t2.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t13.c1 1 100.00 Using where +2 MATERIALIZED t2 NULL index c1 c1 9 NULL 5 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t2 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t2); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t2 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t3 WHERE t13.c1=t3.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t3 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t3 WHERE t13.c1=t3.c1; +c1 c1 +64 64.00 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 4 test.t13.c1 1 100.00 Using where +2 MATERIALIZED t3 NULL index c1 c1 4 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t3 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t3); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t3 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t4 WHERE t13.c1=t4.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t4 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t4 WHERE t13.c1=t4.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t13.c1 1 100.00 Using where +2 MATERIALIZED t4 NULL index c1 c1 5 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t4 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t4); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t4 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t5 WHERE t13.c1=t5.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t5 NULL ref c1 c1 9 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t5 WHERE t13.c1=t5.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 9 test.t13.c1 1 100.00 Using where +2 MATERIALIZED t5 NULL index c1 c1 9 NULL 4 100.00 Using index +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t5 NULL index_subquery c1 c1 9 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t5); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t5 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t6 WHERE t13.c1=t6.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t6 WHERE t13.c1=t6.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t6 NULL index c1 c1 241 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t6); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t6 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t7 WHERE t13.c1=t7.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t7 WHERE t13.c1=t7.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t7 NULL index c1 c1 243 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t7); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t7 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t8 WHERE t13.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t8 WHERE t13.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t8 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t8 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t8); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t8 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t9 WHERE t13.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t9 WHERE t13.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t13.c1 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t9 NULL index_subquery c1 c1 5 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t9 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t10 WHERE t13.c1=t10.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t10 WHERE t13.c1=t10.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t10 NULL ref c1 c1 4 test.t13.c1 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t10 NULL index_subquery c1 c1 4 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t10); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t10 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t11 WHERE t13.c1=t11.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t13.c1 1 100.00 Using where; Using index +SELECT * FROM t13 STRAIGHT_JOIN t11 WHERE t13.c1=t11.c1; +c1 c1 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using where; Using index +1 SIMPLE t11 NULL ref c1 c1 6 test.t13.c1 1 100.00 Using where; Using index; Start temporary; End temporary +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t11 NULL index_subquery c1 c1 6 func 1 100.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t11); +c1 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t11 WHERE ASCII(c1) = 50); +1 +EXPLAIN SELECT * FROM t13 STRAIGHT_JOIN t12 WHERE t13.c1=t12.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t13 STRAIGHT_JOIN t12 WHERE t13.c1=t12.c1; +c1 c1 +64 64 +EXPLAIN SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t13 NULL index c1 c1 9 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t13 WHERE c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t13 NULL index c1 c1 9 NULL 2 100.00 Using index +2 DEPENDENT SUBQUERY t12 NULL index c1 c1 21 NULL 5 20.00 Using where; Using index +SELECT * FROM t13 GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t12); +c1 +64 +EXPLAIN SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY t13 NULL index NULL c1 9 NULL 2 100.00 Using where; Using index +SELECT 1 FROM t13 WHERE (SELECT 1 FROM t13 WHERE ASCII(c1) = 50) IN +(SELECT 1 FROM t12 WHERE ASCII(c1) = 50); +1 +SET TIMESTAMP=UNIX_TIMESTAMP(20140413000000); +EXPLAIN SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE t9 NULL ref c1 c1 5 test.t8.c1 1 100.00 Using where; Using index +SELECT * FROM t8 STRAIGHT_JOIN t9 WHERE t8.c1=t9.c1; +c1 c1 +EXPLAIN SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 100.00 Using where; Using index +1 SIMPLE NULL eq_ref 5 test.t8.c1 1 100.00 Using where +2 MATERIALIZED t9 NULL index c1 c1 5 NULL 2 100.00 Using index +SELECT * FROM t8 WHERE c1 IN (SELECT c1 FROM t9); +c1 +EXPLAIN SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; Using join buffer (Block Nested Loop) +SELECT * FROM t9 STRAIGHT_JOIN t8 WHERE t9.c1=t8.c1; +c1 c1 +EXPLAIN SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t9 NULL index c1 c1 5 NULL 2 100.00 Using index; Start temporary +1 SIMPLE t8 NULL index c1 c1 4 NULL 3 33.33 Using where; Using index; End temporary; Using join buffer (Block Nested Loop) +SELECT * FROM t9 WHERE c1 IN (SELECT c1 FROM t8); +c1 +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13; diff --git a/mysql-test/r/subquery_sj_all.result b/mysql-test/r/subquery_sj_all.result index 5c096fddfbe..b3abda2a9f2 100644 --- a/mysql-test/r/subquery_sj_all.result +++ b/mysql-test/r/subquery_sj_all.result @@ -12861,9 +12861,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_all_bka.result b/mysql-test/r/subquery_sj_all_bka.result index aa44ee4a832..b5a553f819b 100644 --- a/mysql-test/r/subquery_sj_all_bka.result +++ b/mysql-test/r/subquery_sj_all_bka.result @@ -12867,9 +12867,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_all_bka_nixbnl.result b/mysql-test/r/subquery_sj_all_bka_nixbnl.result index 6f517183d55..664107f52d7 100644 --- a/mysql-test/r/subquery_sj_all_bka_nixbnl.result +++ b/mysql-test/r/subquery_sj_all_bka_nixbnl.result @@ -12870,9 +12870,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_all_bkaunique.result b/mysql-test/r/subquery_sj_all_bkaunique.result index cc25bc1ee8e..eb8f1b25b8b 100644 --- a/mysql-test/r/subquery_sj_all_bkaunique.result +++ b/mysql-test/r/subquery_sj_all_bkaunique.result @@ -12803,9 +12803,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_mat.result b/mysql-test/r/subquery_sj_mat.result index 177c2e3a0a7..ceb97fc889a 100644 --- a/mysql-test/r/subquery_sj_mat.result +++ b/mysql-test/r/subquery_sj_mat.result @@ -13097,9 +13097,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_mat_bka.result b/mysql-test/r/subquery_sj_mat_bka.result index ff29be94c80..be67c3d88c1 100644 --- a/mysql-test/r/subquery_sj_mat_bka.result +++ b/mysql-test/r/subquery_sj_mat_bka.result @@ -13098,9 +13098,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_mat_bka_nixbnl.result b/mysql-test/r/subquery_sj_mat_bka_nixbnl.result index 958e72f6400..d02774d65ef 100644 --- a/mysql-test/r/subquery_sj_mat_bka_nixbnl.result +++ b/mysql-test/r/subquery_sj_mat_bka_nixbnl.result @@ -13091,9 +13091,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_mat_bkaunique.result b/mysql-test/r/subquery_sj_mat_bkaunique.result index da0dddd802e..ec2b07f82ab 100644 --- a/mysql-test/r/subquery_sj_mat_bkaunique.result +++ b/mysql-test/r/subquery_sj_mat_bkaunique.result @@ -13099,9 +13099,9 @@ id select_type table partitions type possible_keys key key_len ref rows filtered 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 1 PRIMARY NULL eq_ref 5 test.t1.a 1 100.00 NULL 2 MATERIALIZED t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false)) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((``.`a` = `test`.`t1`.`a`) and (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false)) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/r/subquery_sj_mat_nosj.result b/mysql-test/r/subquery_sj_mat_nosj.result index 80dc651006e..ab241a8f30b 100644 --- a/mysql-test/r/subquery_sj_mat_nosj.result +++ b/mysql-test/r/subquery_sj_mat_nosj.result @@ -12789,9 +12789,9 @@ WHERE t3.b=1)); id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where 2 SUBQUERY t2 NULL ALL NULL NULL NULL NULL 5 100.00 Using where -3 DEPENDENT SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where +3 SUBQUERY t3 NULL ALL NULL NULL NULL NULL 5 20.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,`test`.`t1`.`a` in ( (/* select#2 */ select `test`.`t2`.`a` from `test`.`t` `t2` where (concat(`test`.`t2`.`a`,''),(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and (outer_field_is_not_null, (((concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or (`test`.`t3`.`a` is null)), true)) having (outer_field_is_not_null, (`test`.`t3`.`a`), true)) is false) ), (`test`.`t1`.`a` in on where ((`test`.`t1`.`a` = `materialized-subquery`.`a`))))) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where (`test`.`t1`.`a`,`test`.`t1`.`a` in ( (/* select#2 */ select `test`.`t2`.`a` from `test`.`t` `t2` where (concat(`test`.`t2`.`a`,''),concat(`test`.`t2`.`a`,'') in ( (/* select#3 */ select `test`.`t3`.`a` from `test`.`t` `t3` where (`test`.`t3`.`b` = 1) having true ), (concat(`test`.`t2`.`a`,'') in on where ((concat(`test`.`t2`.`a`,'') = `materialized-subquery`.`a`)))) is false) ), (`test`.`t1`.`a` in on where ((`test`.`t1`.`a` = `materialized-subquery`.`a`))))) SELECT * FROM t AS t1 WHERE t1.a IN (SELECT t2.a diff --git a/mysql-test/t/opt_hints_subquery.test b/mysql-test/t/opt_hints_subquery.test index 963392d07c0..a71c097194a 100644 --- a/mysql-test/t/opt_hints_subquery.test +++ b/mysql-test/t/opt_hints_subquery.test @@ -775,11 +775,11 @@ SELECT /*+ SUBQUERY(@subq MATERIALIZATION) */ a, --echo This query does not support Subquery Materialization due to type mismatch EXPLAIN SELECT * FROM t2 -WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ sum(b) FROM t1 group by a); +WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ concat(sum(b),"") FROM t1 group by a); --echo Trying to force Subquery Materialization will not change anything EXPLAIN SELECT /*+ SUBQUERY(@subq MATERIALIZATION) */ * FROM t2 -WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ sum(b) FROM t1 group by a); +WHERE t2.a IN (SELECT /*+ QB_NAME(subq) */ concat(sum(b),"") FROM t1 group by a); --echo Test hints with prepared statements PREPARE stmt1 FROM "EXPLAIN diff --git a/mysql-test/t/subquery_mat_mixed_types.test b/mysql-test/t/subquery_mat_mixed_types.test new file mode 100644 index 00000000000..f26a710b64a --- /dev/null +++ b/mysql-test/t/subquery_mat_mixed_types.test @@ -0,0 +1,127 @@ +--echo # +--echo # Bug#13960580 SUBQUERY MATERIALIZATION IS TOO RESTRICTIVE ON DATA TYPES +--echo # + +CREATE TABLE t1 (c1 INT, KEY(c1)); +CREATE TABLE t2 (c1 BIGINT, KEY(c1)); +CREATE TABLE t3 (c1 DECIMAL(5,2), KEY(c1)); +CREATE TABLE t4 (c1 FLOAT, KEY(c1)); +CREATE TABLE t5 (c1 DOUBLE, KEY(c1)); +CREATE TABLE t6 (c1 CHAR(60), KEY(c1)); +CREATE TABLE t7 (c1 VARCHAR(60), KEY(c1)); +CREATE TABLE t8 (c1 TIME, KEY(c1)); +CREATE TABLE t9 (c1 TIMESTAMP, KEY(c1)); +CREATE TABLE t10 (c1 DATE, KEY(c1)); +CREATE TABLE t11 (c1 DATETIME, KEY(c1)); +CREATE TABLE t12 (c1 CHAR(5) CHARACTER SET UTF16, KEY(c1)); +CREATE TABLE t13 (c1 BIGINT UNSIGNED, KEY(c1)); + +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (64); +INSERT INTO t2 VALUES (3), (9), (64), (-1), (-64); +INSERT INTO t3 VALUES (3.0), (10.0), (64.0), (64.1); +INSERT INTO t4 VALUES (3.3), (9.9), (64e0), (64.1e0); +INSERT INTO t5 VALUES (3.3), (9.9), (64e0), (64.1e0); +INSERT INTO t6 VALUES ('11'), ('21'), ('3'), ('64'), ('64.1'); +INSERT INTO t7 VALUES ('11'), ('21'), ('3'), ('64'), ('64.1'); +# Note that 33:22:33 means 33 hours from the current date. +INSERT INTO t8 VALUES ('10:22:33'), ('12:34:56'), ('33:22:33'); +INSERT INTO t9 VALUES (20150413102233), (19990102123456); +INSERT INTO t10 VALUES ('1998-01-01'), ('2015-04-13'); +INSERT INTO t11 VALUES ('1999-08-14 01:00:00'), ('2015-04-13 10:22:33'), +('2015-04-14 09:22:33'); +INSERT INTO t12 VALUES ('11'), ('3'), ('21'), ('64'), ('64.1'); +INSERT INTO t13 VALUES (64),(18446744073709551615); # 2^64-1 + +ANALYZE TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13; + +# Test subquery materialization +set optimizer_switch='semijoin=off,materialization=on,subquery_materialization_cost_based=off'; +--disable_warnings + +let $c=2; + +while ($c) +{ +if ($c == 1) +{ +# Test semijoin materialization +set optimizer_switch='semijoin=on,firstmatch=off,loosescan=off,duplicateweedout=off,materialization=on,subquery_materialization_cost_based=on'; +} +dec $c; + +# Set "today", so TIME is extended with same day as what's in +# DATETIME/TIMESTAMP +SET TIMESTAMP=UNIX_TIMESTAMP(20150413000000); +# Note that results of comparing TIME with DATETIME/TIMESTAMP are not +# consistent between IN-to-EXISTS and materializations, see bug#75644. + +let $table_count= 13; +let $i= 1; +let $j= 2; +while ($i <= $table_count) +{ + while ($j <= $table_count) + { + if ($i != $j) + { + let $stmt1= SELECT * FROM t$i STRAIGHT_JOIN t$j WHERE t$i.c1=t$j.c1; + eval EXPLAIN $stmt1; + eval $stmt1; + let $stmt2= SELECT * FROM t$i WHERE c1 IN (SELECT c1 FROM t$j); + eval EXPLAIN $stmt2; + eval $stmt2; + let $stmt3= SELECT * FROM t$i GROUP BY c1 HAVING c1 IN (SELECT c1 FROM t$j); + eval EXPLAIN $stmt3; + eval $stmt3; + if ($i == 11) + { + # This value causes two rows in scalar subquery below, + # so remove it just for this query + DELETE FROM t11 WHERE c1='2015-04-14 09:22:33'; + ANALYZE TABLE t11; + } + let $stmt4= SELECT 1 FROM t$i WHERE (SELECT 1 FROM t$i WHERE ASCII(c1) = 50) IN + (SELECT 1 FROM t$j WHERE ASCII(c1) = 50); + eval EXPLAIN $stmt4; + eval $stmt4; + if ($i == 11) + { + INSERT INTO t11 SET c1='2015-04-14 09:22:33'; + ANALYZE TABLE t11; + } +} + inc $j; + } + inc $i; + let $j=1; +} + +# Set "today" differently, so TIME is extended with another day than +# what's in DATETIME/TIMESTAMP +SET TIMESTAMP=UNIX_TIMESTAMP(20140413000000); +# and now some matches should disappear: + +let $i=8; +let $j=9; +let $stmt1= SELECT * FROM t$i STRAIGHT_JOIN t$j WHERE t$i.c1=t$j.c1; +eval EXPLAIN $stmt1; +eval $stmt1; +let $stmt2= SELECT * FROM t$i WHERE c1 IN (SELECT c1 FROM t$j); +eval EXPLAIN $stmt2; +eval $stmt2; + +let $i=9; +let $j=8; +let $stmt1= SELECT * FROM t$i STRAIGHT_JOIN t$j WHERE t$i.c1=t$j.c1; +eval EXPLAIN $stmt1; +eval $stmt1; +let $stmt2= SELECT * FROM t$i WHERE c1 IN (SELECT c1 FROM t$j); +eval EXPLAIN $stmt2; +eval $stmt2; + + +} + +--enable_warnings + +DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 9f29bc3c8ef..37d7427591d 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -7097,7 +7097,7 @@ static bool comparable_in_index(Item *cond_func, const Field *field, if (!field->is_temporal() && value->is_temporal()) return false; /* - Temporal values: Cannot use range access if + Temporal values: Cannot use range access if IndexedTimeComparedToDate: 'indexed_time = temporal_value_with_date_part' because: - without index, a TIME column with value '48:00:00' is diff --git a/sql/sql_optimizer.cc b/sql/sql_optimizer.cc index 757a1dfa1e8..484c584e23d 100644 --- a/sql/sql_optimizer.cc +++ b/sql/sql_optimizer.cc @@ -6787,12 +6787,12 @@ static bool add_key_field(THD *thd, Key_field **key_fields, uint and_level, IndexedTimeComparedToDate: can't optimize 'indexed_time = temporal_expr_with_date_part' because: - without index, a TIME column with value '48:00:00' is equal to a - DATETIME column with value 'CURDATE() + 2 days' + DATETIME column with value 'CURDATE() + 2 days' - with ref access into the TIME column, CURDATE() + 2 days becomes - "00:00:00" (Field_timef::store_internal() simply extracts the time - part from the datetime) which is a lookup key which does not match - "48:00:00"; so ref access is not be able to give the same result - as without index, so is disabled. + "00:00:00" (Field_timef::store_internal() simply extracts the time + part from the datetime) which is a lookup key which does not match + "48:00:00"; so ref access is not be able to give the same result + as without index, so is disabled. On the other hand, we can optimize indexed_datetime = time because Field_temporal_with_date::store_time() will convert 48:00:00 to CURDATE() + 2 days which is the correct lookup key. diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2abb0c6299b..f3239c2eef7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1013,24 +1013,55 @@ bool Sql_cmd_select::precheck(THD *thd) { @retval true If subquery types allow materialization. @retval false Otherwise. + + @note the purpose is similar to that of comparable_in_index(). */ -bool types_allow_materialization(Item *outer, Item *inner) - -{ - if (outer->result_type() != inner->result_type()) return false; - switch (outer->result_type()) { - case ROW_RESULT: - // Materialization of rows nested inside rows is not currently supported. - return false; - case STRING_RESULT: - if (outer->is_temporal_with_date() != inner->is_temporal_with_date()) - return false; - if (!(outer->collation.collation == inner->collation.collation - /*&& outer->max_length <= inner->max_length */)) - return false; - default:; /* suitable for materialization */ +bool types_allow_materialization(Item *outer, Item *inner) { + auto res_outer = outer->result_type(); + auto res_inner = inner->result_type(); + // Materialization of rows nested inside rows is not currently supported. + if (res_outer == ROW_RESULT || res_inner == ROW_RESULT) return false; + bool num_outer = res_outer == INT_RESULT || res_outer == REAL_RESULT || + res_outer == DECIMAL_RESULT; + bool num_inner = res_inner == INT_RESULT || res_inner == REAL_RESULT || + res_inner == DECIMAL_RESULT; + /* + Materialization uses index lookup which implicitly converts the type of + res_outer into that of res_inner. + However, this can be done only if it respects rules in: + https://dev.mysql.com/doc/refman/8.0/en/type-conversion.html + https://dev.mysql.com/doc/refman/8.0/en/date-and-time-type-conversion.html + Those rules say that, generally, if types differ, we convert them to + REAL. + So, looking up into a number is ok: outer will be converted to + number. Collations don't matter. + This covers e.g. looking up INT into DECIMAL, CHAR into INT, DECIMAL into + BIT. + */ + if (num_inner) return true; + // Conversely, looking up one number into a non-number is not possible. + if (num_outer) return false; + /* + Arguments are strings or temporal. + Require same collation for correct comparison. + */ + DBUG_ASSERT(res_outer == STRING_RESULT && res_inner == STRING_RESULT); + if (outer->collation.collation != inner->collation.collation) return false; + bool temp_outer = outer->is_temporal(); + bool temp_inner = inner->is_temporal(); + /* + Same logic as for numbers. + As explained in add_key_field(), IndexedTimeComparedToDate is not working; + see also field_time_cmp_date(). + @todo unify all pieces of code which deal with this same problem. + */ + if (temp_inner) { + if (!inner->is_temporal_with_date()) + return temp_outer && !outer->is_temporal_with_date(); + return true; } + if (temp_outer) return false; return true; } From fb069ce08316ab56ac5787b2ebc58bc33ffa8601 Mon Sep 17 00:00:00 2001 From: Annamalai Gurusami Date: Tue, 26 Nov 2019 10:29:34 +0530 Subject: [PATCH 3/6] Bug #30499064 ASSERTION FAILURE: BUF0BUF.CC:4189:PAGE_SIZE.EQUALS_TO(SPACE_PAGE_SIZE) Problem: There was an attempt to access an LOB via a LOB null reference. Solution: Check whether the LOB reference is null before accessing it. rb#23454 approved by Rahul Agarkar --- storage/innobase/lob/lob0lob.cc | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/storage/innobase/lob/lob0lob.cc b/storage/innobase/lob/lob0lob.cc index 085d96284f8..d5b7fd10e79 100644 --- a/storage/innobase/lob/lob0lob.cc +++ b/storage/innobase/lob/lob0lob.cc @@ -1397,4 +1397,42 @@ bool rec_check_lobref_space_id(dict_index_t *index, const rec_t *rec, } #endif /* UNIV_DEBUG */ +dberr_t mark_not_partially_updatable(trx_t *trx, dict_index_t *index, + const upd_t *update, mtr_t *mtr) { + if (!index->is_clustered()) { + /* Only clustered index can have LOBs. */ + return (DB_SUCCESS); + } + + const ulint n_fields = upd_get_n_fields(update); + + for (ulint i = 0; i < n_fields; i++) { + const upd_field_t *ufield = upd_get_nth_field(update, i); + + if (update->is_partially_updated(ufield->field_no)) { + continue; + } + + if (ufield->is_virtual()) { + continue; + } + + const dfield_t *new_field = &ufield->new_val; + + if (ufield->ext_in_old && !dfield_is_ext(new_field)) { + const dfield_t *old_field = &ufield->old_val; + byte *field_ref = old_field->blobref(); + ref_t ref(field_ref); + + if (!ref.is_null_relaxed()) { + ut_ad(ref.space_id() == index->space_id()); + ref.mark_not_partially_updatable(trx, mtr, index, + index->get_page_size()); + } + } + } + + return (DB_SUCCESS); +} + } // namespace lob From 9524610c43959557c57c834fa4573666d5271c69 Mon Sep 17 00:00:00 2001 From: Jusufadis Bakamovic Date: Fri, 27 Sep 2019 15:22:25 +0200 Subject: [PATCH 4/6] Bug #30314972 TEMPTABLE SE OUT OF MEMORY BY SHOW VARIABLES Problem: * When temptable_max_ram limit is reached, server will report Out-of-Memory to connected client(s) instead of falling back to disk-based storage. Analysis: * TempTable storage-engine has been (wrongly) reporting Result::OUT_OF_MEMORY no matter what underlying operation failed. * Underlying failures can be one of the following: * Result::OUT_OF_MEMORY * In event of RAM exhaustion. * Result::RECORD_FILE_FULL * In event of temptable_max_ram limit reached or MMAP-disk exhaustion. * Some other runtime exception (which is not of Result:: type) * In event that something else throws, e.g. any of the steps during the new temporary table instantiation. * Optimizer only handles the Result::RECORD_FILE_FULL code-path (aka HA_ERR_RECORD_FILE_FULL), but not the (unexpected) Result::OUT_OF_MEMORY (aka HA_ERR_OUT_OF_MEM). * MTR test against the Result::RECORD_FILE_FULL use-case silently stopped working * There is no failure but the test itself was not hitting the correct code-path: * TempTable SE was ought to be utilized but it stopped being so after optimizer introduced new executor which in certain scenario is skipping the materialization. Solution: * Fix TempTable handler interface to distinguish between RAM- and MMAP-related failures. * Implement new suite of unit-tests to test this behavior at TempTable::Handler interface level. * Fix MTR test to make the Result::RECORD_FILE_FULL code-path gets triggered again. * Stabilize MTR test to make it future-proof by: * Re-writing the SQL query which is more or less guaranteed to result with TempTable utilization AND * Using EXPLAIN FORMAT=tree to actually assert if TempTable is not being utilized Reviewed-by: Marcin Babij --- .../include/search_pattern_on_variable.inc | 27 ++++++++++ mysql-test/r/temptable_error_injection.result | 7 +-- mysql-test/t/temptable_error_injection.test | 9 +++- .../temptable/include/temptable/allocator.h | 2 + storage/temptable/src/handler.cc | 18 +++---- .../gunit/temptable/temptable-handler-t.cc | 54 +++++++++++++++++++ 6 files changed, 104 insertions(+), 13 deletions(-) create mode 100644 mysql-test/include/search_pattern_on_variable.inc diff --git a/mysql-test/include/search_pattern_on_variable.inc b/mysql-test/include/search_pattern_on_variable.inc new file mode 100644 index 00000000000..d26bbce1a4c --- /dev/null +++ b/mysql-test/include/search_pattern_on_variable.inc @@ -0,0 +1,27 @@ +# ==== Purpose ==== +# +# Grep an expression for a pattern, produce a single string out +# depending whether the match was found or not. +# +# The environment variables SEARCH_EXPRESSION and SEARCH_PATTERN +# must be set before sourcing this routine. +# +# ==== Usage ==== +# +# --let SEARCH_EXPRESSION= TEXT +# --let SEARCH_PATTERN= TEXT +# --source include/search_pattern_on_variable.inc + +perl; + use strict; + my $search_expression= $ENV{'SEARCH_EXPRESSION'} or die "SEARCH_EXPRESSION not set"; + my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set"; + if ($search_expression =~ /$search_pattern/) + { + print "Pattern \"$search_pattern\" found\n"; + } + else + { + print "Pattern \"$search_pattern\" not found\n"; + } +EOF diff --git a/mysql-test/r/temptable_error_injection.result b/mysql-test/r/temptable_error_injection.result index fc52f336eec..d756b0f763a 100644 --- a/mysql-test/r/temptable_error_injection.result +++ b/mysql-test/r/temptable_error_injection.result @@ -3,9 +3,10 @@ INSERT INTO t VALUES (1); ANALYZE TABLE t; Table Op Msg_type Msg_text test.t analyze status OK +Pattern "Aggregate using temporary table" found SET debug = '+d,temptable_create_return_full'; -SELECT * FROM t AS t1, t AS t2 ORDER BY 1 LIMIT 1; -c c -1 1 +SELECT * FROM (SELECT COUNT(*) FROM t GROUP BY c) as dt; +COUNT(*) +1 SET debug = '-d,temptable_create_return_full'; DROP TABLE t; diff --git a/mysql-test/t/temptable_error_injection.test b/mysql-test/t/temptable_error_injection.test index 18c4659de89..933cca1c495 100644 --- a/mysql-test/t/temptable_error_injection.test +++ b/mysql-test/t/temptable_error_injection.test @@ -6,9 +6,16 @@ INSERT INTO t VALUES (1); ANALYZE TABLE t; +# Let's use EXPLAIN FORMAT to make sure that our will +# result utilizing the TempTable. Try keeping this MTR test less flaky +# by checking only part of the EXPLAIN FORMAT output. +--let SEARCH_PATTERN = Aggregate using temporary table +--let SEARCH_EXPRESSION = `EXPLAIN FORMAT=tree SELECT * FROM (SELECT COUNT(*) FROM t GROUP BY c) as dt` +--source include/search_pattern_on_variable.inc + SET debug = '+d,temptable_create_return_full'; -SELECT * FROM t AS t1, t AS t2 ORDER BY 1 LIMIT 1; +SELECT * FROM (SELECT COUNT(*) FROM t GROUP BY c) as dt; SET debug = '-d,temptable_create_return_full'; diff --git a/storage/temptable/include/temptable/allocator.h b/storage/temptable/include/temptable/allocator.h index 9aec6ca9a76..9b42d14622e 100644 --- a/storage/temptable/include/temptable/allocator.h +++ b/storage/temptable/include/temptable/allocator.h @@ -332,6 +332,8 @@ template inline T *Allocator::allocate(size_t n_elements) { DBUG_ASSERT(n_elements <= std::numeric_limits::max() / sizeof(T)); DBUG_EXECUTE_IF("temptable_allocator_oom", throw Result::OUT_OF_MEM;); + DBUG_EXECUTE_IF("temptable_allocator_record_file_full", + throw Result::RECORD_FILE_FULL;); const size_t n_bytes_requested = n_elements * sizeof(T); if (n_bytes_requested == 0) { diff --git a/storage/temptable/src/handler.cc b/storage/temptable/src/handler.cc index bd2098fcb0e..2810b52d2e4 100644 --- a/storage/temptable/src/handler.cc +++ b/storage/temptable/src/handler.cc @@ -119,24 +119,24 @@ int Handler::create(const char *table_name, TABLE *mysql_table, } } - Result ret = Result::OUT_OF_MEM; + Result ret; try { - // clang-format off - DBUG_EXECUTE_IF( - "temptable_create_return_full", - ret = Result::RECORD_FILE_FULL; - throw std::bad_alloc(); - ); - // clang-format on + DBUG_EXECUTE_IF("temptable_create_return_full", + throw Result::RECORD_FILE_FULL;); + DBUG_EXECUTE_IF("temptable_create_return_non_result_type_exception", + throw 42;); const auto insert_result = tls_tables.emplace( std::piecewise_construct, std::make_tuple(table_name), std::forward_as_tuple(mysql_table, all_columns_are_fixed_size)); ret = insert_result.second ? Result::OK : Result::TABLE_EXIST; + + } catch (Result ex) { + ret = ex; } catch (...) { - /* ret is already set above. */ + ret = Result::OUT_OF_MEM; } DBUG_PRINT("temptable_api", diff --git a/unittest/gunit/temptable/temptable-handler-t.cc b/unittest/gunit/temptable/temptable-handler-t.cc index cc8421cd44e..65a5146c705 100644 --- a/unittest/gunit/temptable/temptable-handler-t.cc +++ b/unittest/gunit/temptable/temptable-handler-t.cc @@ -105,6 +105,60 @@ TEST_F(Handler_test, SimpleTableCreate) { EXPECT_EQ(handler.delete_table(table_name, nullptr), 0); } +#ifndef DBUG_OFF +TEST_F( + Handler_test, + TableCreateReturnsRecordFileFullWhenTempTableAllocatorThrowsRecordFileFull) { + const char *table_name = "t1"; + + Table_helper table_helper(table_name, thd()); + table_helper.add_field_long("col0", false); + table_helper.finalize(); + + temptable::Handler handler(hton(), table_helper.table_share()); + table_helper.set_handler(&handler); + + DBUG_SET("+d,temptable_allocator_record_file_full"); + EXPECT_EQ(handler.create(table_name, table_helper.table(), nullptr, nullptr), + HA_ERR_RECORD_FILE_FULL); + DBUG_SET("-d,temptable_allocator_record_file_full"); +} + +TEST_F(Handler_test, + TableCreateReturnsOutOfMemoryWhenTempTableAllocatorThrowsOutOfMemory) { + const char *table_name = "t1"; + + Table_helper table_helper(table_name, thd()); + table_helper.add_field_long("col0", false); + table_helper.finalize(); + + temptable::Handler handler(hton(), table_helper.table_share()); + table_helper.set_handler(&handler); + + DBUG_SET("+d,temptable_allocator_oom"); + EXPECT_EQ(handler.create(table_name, table_helper.table(), nullptr, nullptr), + HA_ERR_OUT_OF_MEM); + DBUG_SET("-d,temptable_allocator_oom"); +} + +TEST_F(Handler_test, + TableCreateReturnsOutOfMemoryWhenCatchAllHandlerIsActivated) { + const char *table_name = "t1"; + + Table_helper table_helper(table_name, thd()); + table_helper.add_field_long("col0", false); + table_helper.finalize(); + + temptable::Handler handler(hton(), table_helper.table_share()); + table_helper.set_handler(&handler); + + DBUG_SET("+d,temptable_create_return_non_result_type_exception"); + EXPECT_EQ(handler.create(table_name, table_helper.table(), nullptr, nullptr), + HA_ERR_OUT_OF_MEM); + DBUG_SET("-d,temptable_create_return_non_result_type_exception"); +} +#endif /* DBUG_OFF */ + TEST_F(Handler_test, SimpleTableOpsFixedSize) { const char *table_name = "t1"; From d906314854c2a7d16df41172cc346c76ffc8580d Mon Sep 17 00:00:00 2001 From: Annamalai Gurusami Date: Mon, 4 Nov 2019 12:01:06 +0530 Subject: [PATCH 5/6] Bug #30197056 INNODB: ASSERTION FAILURE: PAGE_TYPE == FIL_PAGE_TYPE_ZLOB_FIRST AT ZLOB0READ.CC Problem: Consider the scenario where the zlob (compressed LOB) is stored in old format using a single zlib stream. The purge will process this zlob by removing the first page of the LOB repeatedly. There seems to be a race condition b/w purge thread and an update thread that is reusing a delete marked record. Because of this the update thread sees a lob whose first page is of type FIL_PAGE_TYPE_ZBLOB2, which suggests that the zlob is partially purged. The test case just demonstrates that it is possible for the first page of LOB to be FIL_PAGE_TYPE_ZBLOB2 because of partial purging. Solution: I think we can remove the failing assert. rb#23293 approved by Kuba --- .../innodb/r/zlob_rollback_crash_6.result | 19 +++++++++++ .../suite/innodb/t/zlob_rollback_crash_6.test | 34 +++++++++++++++++++ storage/innobase/include/mtr0mtr.h | 1 + storage/innobase/lob/lob0del.cc | 7 +++- storage/innobase/lob/lob0first.cc | 3 ++ storage/innobase/lob/lob0purge.cc | 6 ++-- storage/innobase/lob/zlob0read.cc | 11 +++--- storage/innobase/mtr/mtr0mtr.cc | 5 +++ 8 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 mysql-test/suite/innodb/r/zlob_rollback_crash_6.result create mode 100644 mysql-test/suite/innodb/t/zlob_rollback_crash_6.test diff --git a/mysql-test/suite/innodb/r/zlob_rollback_crash_6.result b/mysql-test/suite/innodb/r/zlob_rollback_crash_6.result new file mode 100644 index 00000000000..ab3e03076ed --- /dev/null +++ b/mysql-test/suite/innodb/r/zlob_rollback_crash_6.result @@ -0,0 +1,19 @@ +# +# Bug #30197056 INNODB: ASSERTION FAILURE: PAGE_TYPE == +# FIL_PAGE_TYPE_ZLOB_FIRST AT ZLOB0READ.CC +# +SET GLOBAL innodb_compression_level = 0; +CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 LONGBLOB) ROW_FORMAT=COMPRESSED; +INSERT INTO t1 VALUES (1, REPEAT('+', 40000)); +SET DEBUG = '+d,lob_insert_single_zstream'; +START TRANSACTION; +INSERT INTO t1 VALUES (2, REPEAT('~', 40000)); +SET DEBUG = '+d,ib_zlob_deleter_middle_crash'; +ROLLBACK; +ERROR HY000: Lost connection to MySQL server during query +# restart +SELECT f1, LENGTH(f2) FROM t1 FOR UPDATE; +f1 LENGTH(f2) +1 40000 +DROP TABLE t1; +SET GLOBAL innodb_compression_level = DEFAULT; diff --git a/mysql-test/suite/innodb/t/zlob_rollback_crash_6.test b/mysql-test/suite/innodb/t/zlob_rollback_crash_6.test new file mode 100644 index 00000000000..d5ed77c0ebd --- /dev/null +++ b/mysql-test/suite/innodb/t/zlob_rollback_crash_6.test @@ -0,0 +1,34 @@ +--source include/have_debug.inc +--source include/have_innodb_max_16k.inc + +--echo # +--echo # Bug #30197056 INNODB: ASSERTION FAILURE: PAGE_TYPE == +--echo # FIL_PAGE_TYPE_ZLOB_FIRST AT ZLOB0READ.CC +--echo # + +SET GLOBAL innodb_compression_level = 0; + +CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 LONGBLOB) ROW_FORMAT=COMPRESSED; + +# The size of the BLOB is specified as 40000 bytes so that it will be +# stored externally. +INSERT INTO t1 VALUES (1, REPEAT('+', 40000)); + +SET DEBUG = '+d,lob_insert_single_zstream'; + +START TRANSACTION; +INSERT INTO t1 VALUES (2, REPEAT('~', 40000)); + +--source include/expect_crash.inc + +SET DEBUG = '+d,ib_zlob_deleter_middle_crash'; +--error 2013 +ROLLBACK; + +--source include/start_mysqld.inc + +SELECT f1, LENGTH(f2) FROM t1 FOR UPDATE; +DROP TABLE t1; + +SET GLOBAL innodb_compression_level = DEFAULT; + diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index d5f6e6c502b..82d9e6e77a7 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -435,6 +435,7 @@ struct mtr_t { return (m_impl.m_log.size() + (m_impl.m_n_log_recs > 1 ? 1 : 0)); } + void wait_for_flush(); #endif /* UNIV_DEBUG */ /** @return true if a record was added to the mini-transaction */ diff --git a/storage/innobase/lob/lob0del.cc b/storage/innobase/lob/lob0del.cc index e6c9c723d9f..bf3ba904425 100644 --- a/storage/innobase/lob/lob0del.cc +++ b/storage/innobase/lob/lob0del.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2015, 2018, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2015, 2019, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the @@ -120,6 +120,11 @@ dberr_t Deleter::destroy() { if (err != DB_SUCCESS) { break; } + + DBUG_EXECUTE_IF("ib_zlob_deleter_middle_crash", { + m_mtr.wait_for_flush(); + DBUG_SUICIDE(); + }); } return (err); diff --git a/storage/innobase/lob/lob0first.cc b/storage/innobase/lob/lob0first.cc index fafa9d1885c..35d8ab7af6e 100644 --- a/storage/innobase/lob/lob0first.cc +++ b/storage/innobase/lob/lob0first.cc @@ -341,6 +341,9 @@ buf_block_t *first_page_t::load_x(const page_id_t &page_id, case FIL_PAGE_SDI_ZBLOB: case FIL_PAGE_SDI_BLOB: /* Valid first page type.*/ + case FIL_PAGE_TYPE_ZBLOB2: + /* Because of partially purged ZBLOB, we might see this page type as + the first page of the ZBLOB. */ break; default: std::cerr << "Unexpected LOB first page type=" << page_type << std::endl; diff --git a/storage/innobase/lob/lob0purge.cc b/storage/innobase/lob/lob0purge.cc index 9ebb7e7225c..2e7b6161d07 100644 --- a/storage/innobase/lob/lob0purge.cc +++ b/storage/innobase/lob/lob0purge.cc @@ -348,8 +348,10 @@ void purge(DeleteContext *ctx, dict_index_t *index, trx_id_t trxid, page_type_t page_type = first_page_t::get_page_type(index, page_id, page_size); - if (page_type == FIL_PAGE_TYPE_ZBLOB || page_type == FIL_PAGE_TYPE_BLOB || - page_type == FIL_PAGE_SDI_BLOB || page_type == FIL_PAGE_SDI_ZBLOB) { + if (page_type == FIL_PAGE_TYPE_ZBLOB || + page_type == FIL_PAGE_TYPE_ZBLOB2 || /* Partially purged ZBLOB */ + page_type == FIL_PAGE_TYPE_BLOB || page_type == FIL_PAGE_SDI_BLOB || + page_type == FIL_PAGE_SDI_ZBLOB) { lob::Deleter free_blob(*ctx); free_blob.destroy(); return; diff --git a/storage/innobase/lob/zlob0read.cc b/storage/innobase/lob/zlob0read.cc index 0909db884a1..ad9d1377399 100644 --- a/storage/innobase/lob/zlob0read.cc +++ b/storage/innobase/lob/zlob0read.cc @@ -90,14 +90,11 @@ ulint z_read(ReadContext *ctx, lob::ref_t ref, ulint offset, ulint len, return (reader.length()); } - ut_ad(page_type == FIL_PAGE_TYPE_ZLOB_FIRST); - if (page_type != FIL_PAGE_TYPE_ZLOB_FIRST) { - /* In the optimized build, assume that the BLOB has been freed and return - without taking further action. This condition is hit when there are stale - LOB references in the clustered index record, especially when there are - server crashes during updation of delete-marked clustered index record - with external fields. */ + /* Assume that the BLOB has been freed and return without taking further + action. This condition is hit when there are stale LOB references in the + clustered index record, especially when there are server crashes during + updation of delete-marked clustered index record with external fields. */ mtr_commit(&mtr); return (0); } diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index e97541ad447..383bbc86f11 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -911,5 +911,10 @@ void mtr_commit_mlog_test_filling_block(log_t &log, size_t req_space_left) { mtr_commit_mlog_test_filling_block_low(log, req_space_left, 1); } +void mtr_t::wait_for_flush() { + ut_ad(commit_lsn() > 0); + log_write_up_to(*log_sys, commit_lsn(), true); +} + #endif /* UNIV_DEBUG */ #endif /* !UNIV_HOTBACKUP */ From 3e00ed0b8bacdb0a11b1e9ac1255ffa0c5821bba Mon Sep 17 00:00:00 2001 From: geraldlu Date: Wed, 14 May 2025 17:28:47 +0800 Subject: [PATCH 6/6] Revert "Bug #30499064 ASSERTION FAILURE: BUF0BUF.CC:4189:PAGE_SIZE.EQUALS_TO(SPACE_PAGE_SIZE)" This reverts commit fb069ce08316ab56ac5787b2ebc58bc33ffa8601. --- storage/innobase/lob/lob0lob.cc | 38 --------------------------------- 1 file changed, 38 deletions(-) diff --git a/storage/innobase/lob/lob0lob.cc b/storage/innobase/lob/lob0lob.cc index d5b7fd10e79..085d96284f8 100644 --- a/storage/innobase/lob/lob0lob.cc +++ b/storage/innobase/lob/lob0lob.cc @@ -1397,42 +1397,4 @@ bool rec_check_lobref_space_id(dict_index_t *index, const rec_t *rec, } #endif /* UNIV_DEBUG */ -dberr_t mark_not_partially_updatable(trx_t *trx, dict_index_t *index, - const upd_t *update, mtr_t *mtr) { - if (!index->is_clustered()) { - /* Only clustered index can have LOBs. */ - return (DB_SUCCESS); - } - - const ulint n_fields = upd_get_n_fields(update); - - for (ulint i = 0; i < n_fields; i++) { - const upd_field_t *ufield = upd_get_nth_field(update, i); - - if (update->is_partially_updated(ufield->field_no)) { - continue; - } - - if (ufield->is_virtual()) { - continue; - } - - const dfield_t *new_field = &ufield->new_val; - - if (ufield->ext_in_old && !dfield_is_ext(new_field)) { - const dfield_t *old_field = &ufield->old_val; - byte *field_ref = old_field->blobref(); - ref_t ref(field_ref); - - if (!ref.is_null_relaxed()) { - ut_ad(ref.space_id() == index->space_id()); - ref.mark_not_partially_updatable(trx, mtr, index, - index->get_page_size()); - } - } - } - - return (DB_SUCCESS); -} - } // namespace lob