Subject | Re: [ib-support] query plan |
---|---|
Author | Helen Borrie |
Post date | 2003-04-30T01:34Z |
At 10:15 PM 29/04/2003 -0300, you wrote:
many rows, the optimizer may calculate that a scan will be faster than
using the index.
heLen
>hi,Yes. If the FK index has low selectivity, or notificacion table has not
>
>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?
many rows, the optimizer may calculate that a scan will be faster than
using the index.
heLen