Which is fastest? [message #371561] |
Wed, 08 November 2000 03:22 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Prashant patil
Messages: 6 Registered: October 2000
|
Junior Member |
|
|
I have 2 Tables EMP and DEPT. DEPT is Master and EMP is Detail Table.
select a.ename, b.dname from emp a, dept b where a.deptno=b.deptno
and
select a.ename, b.dname from dept b, emp a where a.deptno=b.deptno
which query will work fast or both are same. and Way?
|
|
|
Re: Which is fastest? [message #371570 is a reply to message #371561] |
Wed, 08 November 2000 15:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
rachna
Messages: 4 Registered: November 2000
|
Junior Member |
|
|
Assuming that employee is a large table when compared to department the first query will work faster since it involves one full table scan of employee table and 'n' scans of deaprtment table where 'n' is the number of rows in employee.
|
|
|