Subject Optimizer or De-optimizer ?
Author Carlos H. Cantu
Hi !

Ok, everyone knows that the IB Optimizer has some flaws, but it is supposed
to work well with simple stataments, so why this ??? :

select a.*, f.forn_nome, f.forn_end
from AQUISI a
join forn f on f.cod_forn = a.cod_forn

generated plan :

PLAN JOIN (F NATURAL,A INDEX (RDB$FOREIGN57))

f.cod_forn is the primary key of FORN. Why the optimizer isn't using the
index in this simple join ????

[]s

Carlos
WarmBoot Informatica - http://www.warmboot.com.br
Interbase-BR - http://www.interbase-br.com