[ORACLE] Oracle9i 실행계획 보기
Computer_IT/DBMS2006. 9. 18. 12:55
반응형
필요한 스크립트
$ORACLE_HOME/rdbms/admin/utlxplan.sql 실행
SQL> explain plan
set statement_id = 'lab1' for
select *
from emp
where empno = 7777;
set statement_id = 'lab1' for
select *
from emp
where empno = 7777;
SQL> select id
, lpad(' ',2*level)||operation
||decode(id,0,' Cost = '||position)
||' '||options
||' '||object_name as "Query Plan"
from plan_table
where statement_id = 'lab1'
connect by prior id=parent_id
start with id=0;
, lpad(' ',2*level)||operation
||decode(id,0,' Cost = '||position)
||' '||options
||' '||object_name as "Query Plan"
from plan_table
where statement_id = 'lab1'
connect by prior id=parent_id
start with id=0;
결과
ID Query Plan
---------- --------------------------------------------
0 SELECT STATEMENT Cost =
---------- --------------------------------------------
0 SELECT STATEMENT Cost =
1 TABLE ACCESS BY INDEX ROWID EMP
2 INDEX UNIQUE SCAN PK_EMP
반응형
'Computer_IT > DBMS' 카테고리의 다른 글
[ORACLE] 제어판->관리도구->불필요 서비스 삭제 (0) | 2007.03.13 |
---|---|
[Oracle] Cluster 구성 (0) | 2006.11.01 |
ORACLE USER KILL (0) | 2006.09.18 |
CBO (0) | 2006.08.07 |
Oracle® Database SQL Reference (0) | 2006.08.07 |