Subject | RE: [ib-support] query plan |
---|---|
Author | Pavel Cisar |
Post date | 2003-04-30T09:44:34Z |
Hi,
On 29 Apr 2003 at 22:29, PODESTA Mariano APRE wrote:
> i know i did not put any where clause, but the problem starts with:
>
> select
> cu.id_cuenta
> from cuenta cu
> join notificacion nt on nt.id_cuenta = cu.id_cuenta
> join noti_recipiente nr on nr.id_notificacion = nt.id_notificacion
> join recipiente re on re.id_recipiente = nr.id_recipiente
> join noti_servicio ns on ns.id_noti_servicio = re.id_noti_servicio
> left join noti_reglas ng on ng.id_noti_reglas = nt.id_noti_reglas and
> ng.activo = 1
> where
> cu.id_cuenta = 696 and
> nt.id_evento = 123
>
> PLAN JOIN (JOIN (NS NATURAL,RE INDEX (FK_RECIPIENTE_NS),NR
> INDEFK_NOTI_RECIPIENTE_REN57)PK_NOTIFICACIONB$PRIMARY48,RDB$FOREIGN5PK_CUENT
> A(RDB$PRIMARY1)),NG INDEX (PK_NOTI_REGLAS))
>
> again, natural is there. why?
NATURAL scan is there because you requested the LEFT (OUTER) JOIN. Outer
joins without WHERE filter condition are always evaluated by natural scan
from obvious reasons.
Best regards
Pavel Cisar
See you at the First European Firebird Conference in May in Fulda,
Germany
http://www.firebird-conference.com
http://www.ibphoenix.com
For all your upto date Firebird and
InterBase information