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

Fixed bug in the optimiser for FULL TABLE SCAN case:

to estimate correctly cost of full table scan we should take into
account rows read and skipped on each iteration.
This commit is contained in:
kostja@oak.local
2003-09-15 22:21:39 +04:00
parent 4871a35e8a
commit ab576328f0
4 changed files with 27 additions and 29 deletions

View File

@ -70,7 +70,7 @@ insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(nu
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
table type possible_keys key key_len ref rows Extra
t1 ALL b NULL NULL NULL 21
t2 ALL b NULL NULL NULL 16 Using where
t2 ref b b 21 t1.b 6 Using where
set MAX_SEEKS_FOR_KEY=1;
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
table type possible_keys key key_len ref rows Extra