SQL Performance (MOSC)

MOSC Banner

Question about explain plan execution order

edited Aug 9, 2017 5:00AM in SQL Performance (MOSC) 1 commentAnswered ✓

I was reading an online blog about order of execution in an explain plan and stumbled upon a doubt about the below plan.

What is the order of operations here?


Execution Plan

----------------------------------------------------------

   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=168 Card=82 Bytes=3936)

   1        TABLE ACCESS (BY INDEX ROWID) OF 'EMP' (Cost=2 Card=1 Bytes=12)

   2    1     NESTED LOOPS (Cost=168 Card=82 Bytes=3936)

   3    2       MERGE JOIN (CARTESIAN) (Cost=4 Card=82 Bytes=2952)

   4    3         TABLE ACCESS (FULL) OF 'DEPT' (Cost=2 Card=1 Bytes=10)

   5    3         BUFFER (SORT) (Cost=2 Card=82 Bytes=2132)

   6    5           TABLE ACCESS (FULL) OF 'BONUS' (Cost=2 Card=82 Bytes=2132)

   7    2       INDEX (RANGE SCAN) OF 'IX_EMP_01' (NON-UNIQUE) (Cost=1 Card=1)

According to the author, The execution order is 4,6,5,3,7,2,1.  My question is step 3 has two children(4 and 5) and step 5 has a child (step 6)  , isn't 6 be the first step in the operation. why does the author say step 4 will be executed first. Is it that the first child step is executed first whether or not second child has a child of its own. Please clarify.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center