Explain plan for an Old Query

Explain plan for an Old Query

set pages 9999 lines 300
select SESSION_ID,SESSION_SERIAL#,SQL_ID,SQL_PLAN_HASH_VALUE from DBA_HIST_ACTIVE_SESS_HISTORY where SESSION_ID=<session_id> and SESSION_SERIAL#=<session_serial>;

SELECT * FROM TABLE(dbms_xplan.display_awr('&SQL_ID'));

SELECT * FROM TABLE(dbms_xplan.display_awr('&SQL_ID','&plan_hash_value'));

select * from table(dbms_xplan.display_awr('&sql_id',null,null,'advanced +peeked_binds'));

SELECT * FROM TABLE(dbms_xplan.display_cursor('&SQL_ID'));

SELECT * FROM TABLE(dbms_xplan.display_cursor('&SQL_ID', '&child_number'));

No comments:

Post a Comment