Presentation is loading. Please wait.

Presentation is loading. Please wait.

Turning Plans into Trees

Similar presentations


Presentation on theme: "Turning Plans into Trees"— Presentation transcript:

1 Turning Plans into Trees
Jonathan Lewis jonathanlewis.wordpress.com

2 Text to Tree (a1) SELECT STATEMENT HASH JOIN TABLE ACCESS FULL T1 TABLE ACCESS FULL T2 TABLE ACCESS FULL T3 Table access full T1 Table access full T2 Table Access Full T3 Hash Join Select Jonathan Lewis © How can we turn a textual execution plan into a tree-diagram. The tree on the right is the picture for the plan on the left.

3 Text to Tree (a2) SELECT STATEMENT HASH JOIN TABLE ACCESS FULL T1
Jonathan Lewis © Put a dot to the left of each line of the plan, then join child dots to their parent dot. I've colour coded the lines for future ease of labelling the final tree.

4 Text to Tree (a3) Rotate slightly Reflect Horizontally
Jonathan Lewis © Eliminate the text, then rotate the diagram clockwise until that the first parent/child line slopes at roughly 45% to the vertical. Then reflect in a vertical line.

5 Text to Tree (a4) Tidy and label
Select Hash Join Hash Join Table Access Full T3 Table access full T1 Table access full T2 Tidy and label Jonathan Lewis © Draw some horizontal guide lines - if the plan is left-deep with no swapped join inputs this is easy. Then make sure no parent/child line descends more than one line.


Download ppt "Turning Plans into Trees"

Similar presentations


Ads by Google