Extracting formated explain Plans from v$sqlplan: Step 1) ===================================================== Need a plan table: drop table sqlplans; create table sqlplans ( statement_id varchar2(30), timestamp date, remarks varchar2(80), operation varchar2(30), options varchar2(255), object_node varchar2(128), object_owner varchar2(30), object_name varchar2(30), object_instance numeric, object_type varchar2(30), optimizer varchar2(255), search_columns number, id numeric, parent_id numeric, position numeric, cost numeric, cardinality numeric, bytes numeric, other_tag varchar2(255), partition_start varchar2(255), partition_stop varchar2(255), partition_id numeric, other long, distribution varchar2(30), cpu_cost numeric, io_cost numeric, temp_space numeric, access_predicates varchar2(4000), filter_predicates varchar2(4000), dbid number); Step 2) ===================================================== Find and offending SQL, for example from statspack report: CPU Elapsd Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value --------------- ------------ -------------- ------ -------- --------- ---------- 4,242,223 1 4,242,223.0 15.5 47.69 4023.44 2149686744 Step 3) ===================================================== Capture the information form v$sqlplan into your plan table: insert into sqlplans select hash_value, sysdate, 'REMARKS', OPERATION, OPTIONS, OBJECT_NODE, OBJECT_OWNER, OBJECT_NAME, 0, 'OBJECT_TYPE', OPTIMIZER, SEARCH_COLUMNS, ID, PARENT_ID, POSITION, COST, CARDINALITY, BYTES, OTHER_TAG, PARTITION_START, PARTITION_STOP, PARTITION_ID, OTHER, DISTRIBUTION, CPU_COST, IO_COST, TEMP_SPACE, ACCESS_PREDICATES, FILTER_PREDICATES, 1 from gv$sql_plan sql where sql.hash_value=&hash_value / Step 4) ===================================================== use dbms_xplan.display to format the output SELECT * FROM TABLE( dbms_xplan.display('SQLPLANS','&hash_value')); PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| ------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | | | | | |* 1 | HASH JOIN | | 25194 | 1599K| | 560 (0)| | 2 | TABLE ACCESS BY INDEX ROWID| UPSTREAM_CHANNEL | 603 | 13869 | | 4 (0)| |* 3 | INDEX RANGE SCAN | PK_UPSTREAM_CHANNEL | 1 | | | 3 (0)| |* 6 | HASH JOIN | | 28752 | 1179K| 600K| 553 (0)| |* 7 | INDEX FAST FULL SCAN | IDX_TOPOLOGY_LINK_INDX_2 | 18410 | 377K| | 43 (0)| |* 8 | TABLE ACCESS FULL | CM_POWER_2 | 33787 | 692K| | 467 (0)| PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - access("PARENTID"="TOPOLOGYID") 3 - access("SECONDID"=) 6 - access("TOPOLOGYID"="TOPOLOGYID") 7 - filter("PARENTLEN"=1 AND "STATEID"=1 AND "LINKTYPEID"=1) 8 - filter("SECONDID"=:1) NOTE: ===================================================== a hash_value can appear in the shared pool multiple times which can be problematic In this case you need to find the child # from v$sql and join that into v$sql_plan as well.