SQL> EXPLAIN PLAN FOR
2 SELECT *
3 FROM t1, t2
4 WHERE t1.id = t2.t1_id(+)
5 AND t2.id IS NOT NULL;
SQL>
SQL> SELECT * FROM table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------
----------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
----------------------------------------------------------------
| 0 | SELECT STATEMENT | | 100 | 11900 | 36 (3)|
|* 1 | HASH JOIN | | 100 | 11900 | 36 (3)|
| 2 | TABLE ACCESS FULL| T1 | 10 | 570 | 5 (0)|
| 3 | TABLE ACCESS FULL| T2 | 100 | 6200 | 30 (0)|
----------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("T1"."ID"="T2"."T1_ID")
Note
-----
- 'PLAN_TABLE' is old version
SQL> EXPLAIN PLAN FOR
2 SELECT /*+ no_outer_join_to_inner */ *
3 FROM t1, t2
4 WHERE t1.id = t2.t1_id(+)
5 AND t2.id IS NOT NULL;
SQL>
SQL> SELECT * FROM table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------
-----------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
-----------------------------------------------------------------
| 0 | SELECT STATEMENT | | 100 | 11900 | 36 (3)|
|* 1 | FILTER | | | | |
|* 2 | HASH JOIN OUTER | | 100 | 11900 | 36 (3)|
| 3 | TABLE ACCESS FULL| T1 | 10 | 570 | 5 (0)|
| 4 | TABLE ACCESS FULL| T2 | 100 | 6200 | 30 (0)|
-----------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("T2"."ID" IS NOT NULL)
2 - access("T1"."ID"="T2"."T1_ID"(+))
Note
-----
- 'PLAN_TABLE' is old version
- 강좌 URL : http://www.gurubee.net/lecture/4368
- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.