Subject RE: [ib-support] query plan
Author PODESTA Mariano APRE
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?

mariano


> -----Original Message-----
> From: PUB: PODESTA Mariano APRE [mailto:SIDTMPO@...]
> Sent: Martes, 29 de Abril (4) del 2003 22:16
> To: ib-support@yahoogroups.com
> Subject: [ib-support] query plan
>
>
> hi,
>
> i have this query:
>
> select
> cu.id_cuenta
> from cuenta cu
> join notificacion nt on nt.id_cuenta = cu.id_cuenta
>
> and i get this plan:
>
> PLAN JOIN (NT NATURAL,CU INDEX (RDB$PRIMARY1))
>
> table cuenta has a pk on id_cuenta
> table notificacion has a fk on id_cuenta
>
> why optimizer choses natural instead fk on notificacion?
> is related to record count?
>
> tia,
> mariano
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/xaxhjB/hdqFAA/bW3JAA/67folB/TM
> --------------------------------------------------------------
> -------~->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>