Explain plan ¿¹Á¦
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2016-02-23 18:19:09
 

$sqlplus "/as sysdba"
SQL> start C:\oracle\product\11.2.0\dbhome_1\sqlplus\ADMIN\plustrce.sql

grant plustrace, dba to scott;

$sqlplus "scott/tiger"
SQL> start C:\oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlxplan.sql

SQL> explain plan set statement_id='dba'
        for select * from big_emp where deptno = 10;

SQL> SELECT cardinality "Rows", lpad(' ',level-1)||operation||' '||options||' '||object_name "Plan"
  FROM PLAN_TABLE
CONNECT BY prior id = parent_id
        AND prior statement_id = statement_id
  START WITH id = 0
        AND statement_id = 'dba'
  ORDER BY id;
 
SQL> SELECT PLAN_TABLE_OUTPUT from TABLE (DBMS_XPLAN.DISPLAY());

SQL> set autotrace trace; ¶Ç´Â set autotrace on; <= SQL¹®ÀÌ ½ÇÇàµÉ ¶§¸¶´Ù ÀÚµ¿À¸·Î È­¸é¿¡ Ãâ·Â
SQL> truncate plan_table;
SQL> set autotrace off;


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦