Performance question [message #411834] |
Tue, 07 July 2009 02:00 |
Olivia
Messages: 519 Registered: June 2008
|
Senior Member |
|
|
WHERE B.k1 = D.k1
AND D.k2 = E.K3
AND E.eff_date >= A.eff_date
In this case, table E joins to both table D and table A, however the join to table A is a range operator (>=). It may seem obvious that table E should be joined after table D, but this is exactly the sort of case where Oracle can mess up.
Why?
|
|
|
|
|
Re: Performance question [message #412530 is a reply to message #411834] |
Thu, 09 July 2009 15:40 |
coleing
Messages: 213 Registered: February 2008
|
Senior Member |
|
|
Update your STATS first(especially histogram data on this kind of situation) - maybe even delete existing stats and re-gather.
Sometimes Oracle can still get it wrong though - in which case you can look at the ORDERED hint to help you out.
|
|
|