|
The behaviour is repeatable on 5.5-10.4, with just a few rows in tables and bigger table. (I used 10000rows just to see a difference in execution time)
igor, could you please take a look:
create table t1 (id varchar(255) not null primary key, b int, key (b));
|
insert into t1 select concat('id',seq),seq from seq_1_to_100;
|
|
create table t2 (id int not null primary key, name varchar(255) not null, key (name));
|
insert into t2 select seq+100,concat('f',seq) from seq_1_to_10000;
|
|
create table t3 (b int not null, c int not null, a varchar(255), primary key (b, c), key (c), key (a));
|
insert into t3 select 1,seq+100,concat('str-1-',seq) from seq_1_to_10000;
|
insert into t3 select 2,seq+100,concat('str-2-',seq) from seq_10001_to_20000;
|
|
create table t4 (id int not null default 0 primary key);
|
insert into t4 select seq from seq_1_to_10000;
|
|
create view v1 as
|
select t3.b, t3.a, t2.name from t3 left join t2 on t3.c = t2.id;
|
|
select 1
|
from
|
t1 join t4 on t1.b=t4.id
|
left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
#left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
where t1.b in (1,2,3,4,5);
|
|
select 1
|
from
|
t1 join t4 on t1.b=t4.id
|
left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
where t1.b in (1,2,3,4,5);
|
|
10.3.15
|
MariaDB [test]> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> #left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
+---+
|
5 rows in set (0.005 sec)
|
|
MariaDB [test]> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
+---+
|
5 rows in set (0.283 sec)
|
MariaDB [test]> explain
|
-> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> #left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+------+-------------+-------+--------+---------------+---------+---------+----------------------+------+--------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------+--------+---------------+---------+---------+----------------------+------+--------------------------+
|
| 1 | SIMPLE | t1 | range | b | b | 5 | NULL | 5 | Using where; Using index |
|
| 1 | SIMPLE | t4 | eq_ref | PRIMARY | PRIMARY | 4 | test.t1.b | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | SIMPLE | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | SIMPLE | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
+------+-------------+-------+--------+---------------+---------+---------+----------------------+------+--------------------------+
|
60 rows in set (0.002 sec)
|
MariaDB [test]> explain
|
-> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------------------------------------+
|
| 1 | PRIMARY | t1 | range | b | b | 5 | NULL | 5 | Using where; Using index |
|
| 1 | PRIMARY | t4 | eq_ref | PRIMARY | PRIMARY | 4 | test.t1.b | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | <derived30> | ALL | NULL | NULL | NULL | NULL | 19731 | Using where; Using join buffer (flat, BNL join) |
|
| 1 | PRIMARY | <derived31> | ALL | NULL | NULL | NULL | NULL | 19731 | Using where; Using join buffer (incremental, BNL join) |
|
| 31 | SUBQUERY | t3 | index | NULL | a | 258 | NULL | 19731 | Using index |
|
| 31 | SUBQUERY | t2 | eq_ref | PRIMARY | PRIMARY | 4 | test.t3.c | 1 | |
|
| 30 | SUBQUERY | t3 | index | NULL | a | 258 | NULL | 19731 | Using index |
|
| 30 | SUBQUERY | t2 | eq_ref | PRIMARY | PRIMARY | 4 | test.t3.c | 1 | |
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------------------------------------+
|
64 rows in set (0.007 sec)
|
MariaDB [test]> select straight_join 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> #left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
+---+
|
5 rows in set (0.808 sec)
|
MariaDB [test]> set join_cache_level=0;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [test]> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
| 1 |
|
+---+
|
5 rows in set (0.110 sec)
|
|
MariaDB [test]> explain
|
-> select 1
|
-> from
|
-> t1 join t4 on t1.b=t4.id
|
-> left join v1 v1_2 on t4.id=v1_2.b and (v1_2.name='f1')
|
-> left join v1 v1_3 on t4.id=v1_3.b and (v1_3.name='f2')
|
-> left join v1 v1_4 on t4.id=v1_4.b and (v1_4.name='f3')
|
-> left join v1 v1_5 on t4.id=v1_5.b and (v1_5.name='f4')
|
-> left join v1 v1_6 on t4.id=v1_6.b and (v1_6.name='f5')
|
-> left join v1 v1_7 on t4.id=v1_7.b and (v1_7.name='f6')
|
-> left join v1 v1_8 on t4.id=v1_8.b and (v1_8.name='f7')
|
-> left join v1 v1_9 on t4.id=v1_9.b and (v1_9.name='f8')
|
-> left join v1 v1_10 on t4.id=v1_10.b and (v1_10.name='f9')
|
-> left join v1 v1_11 on t4.id=v1_11.b and (v1_11.name='f10')
|
-> left join v1 v1_12 on t4.id=v1_12.b and (v1_12.name='f11')
|
-> left join v1 v1_13 on t4.id=v1_13.b and (v1_13.name='f12')
|
-> left join v1 v1_14 on t4.id=v1_14.b and (v1_14.name='f13')
|
-> left join v1 v1_15 on t4.id=v1_15.b and (v1_15.name='f14')
|
-> left join v1 v1_16 on t4.id=v1_16.b and (v1_16.name='f15')
|
-> left join v1 v1_17 on t4.id=v1_17.b and (v1_17.name='f16')
|
-> left join v1 v1_18 on t4.id=v1_18.b and (v1_18.name='f17')
|
-> left join v1 v1_19 on t4.id=v1_19.b and (v1_19.name='f18')
|
-> left join v1 v1_20 on t4.id=v1_20.b and (v1_20.name='f19')
|
-> left join v1 v1_21 on t4.id=v1_21.b and (v1_21.name='f20')
|
-> left join v1 v1_22 on t4.id=v1_22.b and (v1_22.name='f21')
|
-> left join v1 v1_23 on t4.id=v1_23.b and (v1_23.name='f22')
|
-> left join v1 v1_24 on t4.id=v1_24.b and (v1_24.name='f23')
|
-> left join v1 v1_25 on t4.id=v1_25.b and (v1_25.name='f24')
|
-> left join v1 v1_26 on t4.id=v1_26.b and (v1_26.name='f25')
|
-> left join v1 v1_27 on t4.id=v1_27.b and (v1_27.name='f26')
|
-> left join v1 v1_28 on t4.id=v1_28.b and (v1_28.name='f27')
|
-> left join v1 v1_29 on t4.id=v1_29.b and (v1_29.name='f28')
|
-> left join v1 v1_30 on t4.id=v1_30.b and (v1_30.name='f29')
|
-> left join v1 v1_31 on t4.id=v1_31.b and (v1_31.name='f30')
|
-> where t1.b in (1,2,3,4,5);
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------+
|
| 1 | PRIMARY | t1 | range | b | b | 5 | NULL | 5 | Using where; Using index |
|
| 1 | PRIMARY | t4 | eq_ref | PRIMARY | PRIMARY | 4 | test.t1.b | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | t2 | ref | PRIMARY,name | name | 257 | const | 1 | Using where; Using index |
|
| 1 | PRIMARY | t3 | eq_ref | PRIMARY,c | PRIMARY | 8 | test.t1.b,test.t2.id | 1 | Using index |
|
| 1 | PRIMARY | <derived30> | ALL | NULL | NULL | NULL | NULL | 19731 | Using where |
|
| 1 | PRIMARY | <derived31> | ALL | NULL | NULL | NULL | NULL | 19731 | Using where |
|
| 31 | SUBQUERY | t3 | index | NULL | a | 258 | NULL | 19731 | Using index |
|
| 31 | SUBQUERY | t2 | eq_ref | PRIMARY | PRIMARY | 4 | test.t3.c | 1 | |
|
| 30 | SUBQUERY | t3 | index | NULL | a | 258 | NULL | 19731 | Using index |
|
| 30 | SUBQUERY | t2 | eq_ref | PRIMARY | PRIMARY | 4 | test.t3.c | 1 | |
|
+------+-------------+-------------+--------+---------------+---------+---------+----------------------+-------+--------------------------+
|
64 rows in set (0.003 sec)
|
|