Database Reference
In-Depth Information
Figure 14-7. Overview of the processing performed by a merge join
Two-Table Join
The following is a simple execution plan processing a merge join between two tables. The example also shows how to
force a merge join by using the ordered and use_merge hints:
SELECT /*+ ordered use_merge(t2) */ *
FROM t1, t2
WHERE t1.id = t2.t1_id
AND t1.n = 19
------------------------------------
| Id | Operation | Name |
------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | MERGE JOIN | |
| 2 | SORT JOIN | |
|* 3 | TABLE ACCESS FULL| T1 |
|* 4 | SORT JOIN | |
| 5 | TABLE ACCESS FULL| T2 |
------------------------------------
3 - filter("T1"."N"=19)
4 - access("T1"."ID"="T2"."T1_ID")
filter("T1"."ID"="T2"."T1_ID")
 
Search WWH ::




Custom Search