@@ -54,9 +54,9 @@ explain select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)
...
@@ -54,9 +54,9 @@ explain select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)
union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 where used
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 where used
2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using filesort
3 UNION t4 ALL NULL NULL NULL NULL 3 where used; Using filesort
3 UNION t4 ALL NULL NULL NULL NULL 3 where used; Using filesort
4 SUBSELECT t2 ALL NULL NULL NULL NULL 2
4 SUBSELECT t2 ALL NULL NULL NULL NULL 2
2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using filesort
select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2;
select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2;
(select a from t3 where a<t2.a*4 order by 1 desc limit 1) a
(select a from t3 where a<t2.a*4 order by 1 desc limit 1) a
3 1
3 1
...
@@ -163,9 +163,7 @@ UNIQUE KEY `email` (`email`)
...
@@ -163,9 +163,7 @@ UNIQUE KEY `email` (`email`)
INSERT INTO inscrit (pseudo,email) VALUES ('joce','test');
INSERT INTO inscrit (pseudo,email) VALUES ('joce','test');
INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1');
INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1');
INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1');
INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1');
EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT
EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce');
pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT
pseudo FROM inscrit WHERE pseudo='joce');
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra