Database Reference
In-Depth Information
Zig-zag Trees
A
zig-zag tree
, as shown in Figure
14-4
, is a join tree where every join has at least one table as input, but the input
based on the table is sometimes on the left and sometimes on the right. This type of join tree isn't commonly used by
the query optimizer.
Figure 14-4.
In a zig-zag tree, at least one of the two inputs is a table
The following execution plan illustrates the join tree depicted in Figure
14-4
:
-------------------------------------
| Id | Operation | Name |
-------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | HASH JOIN | |
| 2 | HASH JOIN | |
| 3 | TABLE ACCESS FULL | T1 |
| 4 | HASH JOIN | |
| 5 | TABLE ACCESS FULL| T2 |
| 6 | TABLE ACCESS FULL| T3 |
| 7 | TABLE ACCESS FULL | T4 |
-------------------------------------