Execution Plans in SQL and its documentation in Oracle 7 Server Concepts Manual

From: danny lanir <t1dannyl_at_tek.com>
Date: 1995/06/16
Message-ID: <t1dannyl.15.012D2A9B_at_tek.com>#1/1


I am trying to get a better grip on tuning Oracle using the Explain Plan tool. I have a question regarding the documentation in "Oracle 7 Server Concepts Manual" chapter 13, specifically 13-3 thru13-6. In this chapter they show an example as follows:

SELECT ename, job,sal, dname
 FROM emp, dept
WHERE emp.deptno = dept.deptno
 AND NOT EXISTS

	(SELECT * 
	 FROM salgrade
	WHERE emp.sal BETWEEN losal AND hisal)

Then they show a tree diagram :

			    1           Filter
     			   /  \
                              		  /    \  
Nested Loops     	 	2      6       Table Acess (Full) salgrade
	         	               / \
		              /   \  
Table Access (Full) emp      3    4         Table Access (by rowid) dept
   			   |
			   |  
			   5         Index (unique scan) pk_deptno

Next, we have the Explain Plan output

ID OPERATION OPTIONS OBJECT_NAME


0	Select Statemnt	
1	  Filter		
2	     Nested Loops	
3	        TAble Access 	Full		Emp
4	        TAble Access	By Rowid	        	Dept
5		Index	Unique Scan	PK_Deptno
6	     Table Acess	Full		salgrade


Now, on 13-5 it says that the first thing it does is step 3 and brings that to step 2, then goes and does step 5 and brings that to 4, does step 4 and brings that to 2 .....

But according to documentation in the Application Developer's Guide, you should read Explain from the most indented to the least indented step. Wouldn't that mean that first it does step 5, brings it to 4, does step 4 and brings it to 2, then does step 3 and brings it to 2.

If I had procuced an Explain Plan output like the one shown, how would I have known to read it in the way they read it on page 13-5?

Thanks
Danny   Received on Fri Jun 16 1995 - 00:00:00 CEST

Original text of this message