Home » RDBMS Server » Server Administration » Which is fastest?
Which is fastest? [message #371561] Wed, 08 November 2000 03:22 Go to next message
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
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.
Previous Topic: Update to utPLSQL project
Next Topic: repeating values
Goto Forum:
  


Current Time: Fri May 03 16:10:03 CDT 2024