Advantages of Order of Tables in "FROM " Clause [message #623099] |
Thu, 04 September 2014 07:41 |
|
mastansky@gmail.com
Messages: 13 Registered: July 2013 Location: INDIA
|
Junior Member |
|
|
Hi ,
May I know the difference between the following Syntax and how the order of table in the FROM Clause effects the performance and how to calculation ,Can anyone share their ideas .
SELECT
EMP.Ename,
DEPT.Dname
FROM
EMP,DEPT<-------------------------------Order of the tables
WHERE
EMP.Deptno=DEPT.Deptno;
---------------------------------------
SELECT
EMP.Ename,
DEPT.Dname
FROM
DEPT,DEPT<------------------------------Order of tables
WHERE
EMP.Deptno=DEPT.Deptno;
Thanks In Advance.
[Updated on: Thu, 04 September 2014 07:43] Report message to a moderator
|
|
|
|
Re: Advantages of Order of Tables in "FROM " Clause [message #623101 is a reply to message #623099] |
Thu, 04 September 2014 07:49 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
Guess it is a typo in your 2nd query. Perhaps you meant, DEPT, EMP. But does it matter? No. As CM said, oracle handles it. The CBO is smart enough you know. You can check it yourself. Just look at the execution plan. Well, there are ways to force the optimizer to change the order via hint, however it is out of the scope of your question.
|
|
|
|
|
|
|