General Information |
Create Plan Table |
SQL> @?/rdbms/admin/catplan.sql |
Create PLUSTRACE Role |
SQL> @?/sqlplus/admin/plustrce.sql |
Grant PLUSTRACE Role |
GRANT plustrace TO <user_name>; |
SQL> grant plustrace TO uwclass; |
|
Syntax |
SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]] |
Trace and Run |
SQL> set autotrace on
SQL> SELECT * FROM dual;
|
Trace Only |
SQL> set autotrace traceonly
SQL> SELECT * FROM dual;
|
Trace and Explain |
SQL> set autotrace traceonly explain
SQL> SELECT * FROM dual;
|
Trace and Statistics |
SQL> set autotrace traceonly statistics
SQL> SELECT * FROM dual;
|
Stop Tracing |
SET AUTOTRACE OFF |
SQL> set autotrace off |