Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2004

Tip: Looking for answers? Try searching our database.

Any way to Influence predicate correlation ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Reddin - 15 Mar 2004 18:54 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.