Multi-table Join where clause - duplicating?greenspun.com : LUSENET : DBAzine : One Thread |
I have noticed, thru testing, that in a multi-table join if you duplicate and reverse the where clause join conditions that the Oracle parser will find better execution paths to the data.tablea.akey = tableb.bkey [ and tableb.bkey = tablea.akey]
Why does adding the opposite/reversed condition cause the parser to get smarter? Why doesn't the parser already try that combination/path? I routinely tell the developers to just 're-phrase' the where clause and the query magically runs faster.
-- Brian Langstaff (blangstaff@pacificlife.com), May 28, 2003