Hi,
We have a query where if we use an IN() predicate on a FK, the
optimiser cost(and reflected in execution time) is around 1e06,
but,
if we replace this predicate with an IN () of the equivalent PK values
the cost is reduced to a mere 16e03(and also reflected in much faster
execution time, 100x faster)
So, why is the optimiser not able to use the same plan for the
predicate on the FK as it is for the PK values ??
Any useful Register variables to set?
indexes to create?
Hope this makes sense.
Thanks.
Paul
Fan Ruo Xin - 16 Mar 2004 05:02 GMT
Always got headache about constain, foreign key ...
Anyway -
Have you built the index on FK?
Which optimization level are you using?
> Hi,
>
[quoted text clipped - 18 lines]
>
> Paul
Paul Reddin - 17 Mar 2004 17:03 GMT
Hi,
I think we have now discovered a little more about this, which I will
post on a different thread.
Thanks.