3.12使用 EXPLAIN PLAN FOR查看执行计划
使用 explain plan for查看执行计划,用法如下explain plan for s0L语句;
select from table(dbms xplan display),示例( Oraclellgr2,scot账户)如下。SOL> explain plan for select ename, deptno
2 from emp
3 where deptno in (select deptno from dept where dname= 'CHICAGO');
explained
SOL> select from table(dbms xplan.display);
PLAN TABLE OUTPUT