1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Some code optimisations related to EXPLAIN of derived tables and the

resulting code cleanup in our main loop.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-11-09 15:40:46 +02:00
parent bd6f8e0b5f
commit d96c670c70
6 changed files with 37 additions and 90 deletions

View File

@ -71,8 +71,8 @@ select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from
explain select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from
(select * from t2 where a>1) as tt;
id select_type table type possible_keys key key_len ref rows Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 2 where used
1 PRIMARY <derived3> system NULL NULL NULL NULL 1
3 DERIVED t2 ALL NULL NULL NULL NULL 2 where used
2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 where used; Using filesort
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
a