Re: Need help reading SQL Plan Statements

From: Michael Sallwasser <msallwas_at_world.nad.northrop.com>
Date: Wed, 1 Jun 1994 21:45:21 GMT
Message-ID: <Cqqn3M.M4M_at_gremlin.nrtc.northrop.com>


In article <equis.30.00153BED_at_pacific.net> equis_at_pacific.net (Chris Kutler) writes:
>Can someone provide instructions for reading Plan Statements? Are they read
>from top to bottom, or 'bottom-to-top from the inside-out' or what?
>
>OPERATION OPTIONS OBJECT_NAME OBJECT_INSTANCE
>--------------------- ------------------ ------------- ---------------
> SORT ORDER BY
> NESTED LOOPS
> NESTED LOOPS
> TABLE ACCESS BY ROWID 2
> INDEX RANGE SCAN B_INDEX
> TABLE ACCESS BY ROWID A 3
> INDEX UNIQUE SCAN A_INDEX
> TABLE ACCESS BY ROWID C 1
> INDEX RANGE SCAN C_INDEX
>

You do read them from the inside out; however, you are missing an important attribute, POSITION. This will tell you when two items are indented to the same level, which is performed first. The accessing of Table A and B are probably done first and A is probably before B, but that is based on Oracle's preferences for unique scans; however, the unique scan may be predicated on the rows retrieved from table B. One needs to know what is in each of the indexes and the SQL*statement, along with the Explain Plan in order to answer your underlying question, vis. am I making proper use of my indexes and/or do I have the proper indexes?.

-- 
============================================================================
Michael Sallwasser  | Down one path is utter dispair and hopelessness. Down 
Long Beach CA       | the other is total destruction. Let us choose wisely.
============================================================================
Received on Wed Jun 01 1994 - 23:45:21 CEST

Original text of this message