1. Explainplan(将解析的SQL产生的执行计划写入PLAN_TABLES$)
a. Explainplan for +xxSQL
b. Select* from table(dbms_xplan.display)
2. DBMS_XPLAN
a. Select* from table(dbms_xplan.display_cursor(null,null,’advanced’));--有OUTLINED DATA
b. Select* from table(dbms_xplan.display_cursor(null,null,’all’));
c. Select* from table(dbms_xplan.display_cursor(‘SQL ID’/’SQL HASH VALUE’,children_cursor_number,advanced’));--查看当前SHARE_POOL中的PLAN
d. Select* from table(dbms_xplan.display_awr(‘sql_id’));查看历史执行
3. AUTOTRACE
a. Setautot on
b. Setautot off
c. Setautot trace(不显示结果,只显示统计信息,适合结果集大的SQL)
4. 10046与TKPROF
a. @46on12
b. XXSQL
c. @46off
d. @tracefile