Query Tunning [message #341548] |
Tue, 19 August 2008 05:21 |
subbu_tce
Messages: 98 Registered: July 2007 Location: pune
|
Member |
|
|
Dear All,
Kindly suggets the below query.
A) SELECT EMP_CODE,EMP_NAME,DEPT_CODE FROM EMP E , DEPT D
WHERE E.EMP_CODE=D.EMP_CODE AND E.LOCATION_CODE=2001 AND E.STATUS='A';
B) SELECT EMP_CODE,EMP_NAME,DEPT_CODE FROM EMP E , DEPT D
WHERE E.LOCATION_CODE=2001 AND E.STATUS='A' AND E.EMP_CODE=D.EMP_CODE ;
Which query is better A OR B .
How oracle will execute ? wheather the tables will execute from right to left or anything else?Kindly explain me..
|
|
|
|
Re: Query Tunning [message #341817 is a reply to message #341551] |
Wed, 20 August 2008 07:33 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
It will make no difference. The Oracle optimizer performs joins and filters in the order it deems is optimal regardless of the sequence.
Ross Leishman
|
|
|