SELECT description FROM spm_test_tab WHERE id =99;
SELECT*FROMTABLE (SELECT DBMS_XPLAN.DISPLAY_CURSOR(null,null,'advanced') from dual);
PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SQL_ID gat6z1bc6nc2d, child number 0 ------------------------------------- SELECT description FROM spm_test_tab WHERE id =99
select * fromtable( dbms_xplan.display_sql_plan_baseline( sql_handle=>'SQL_7b76323ad90440b9', plan_name=>'SQL_PLAN_7qxjk7bch8h5t3652c362', format=>'basic +NOTE')); -------------------------------------------------------------------------------- SQL handle: SQL_7b76323ad90440b9 SQL text: SELECT description FROM spm_test_tab WHERE id =99 --------------------------------------------------------------------------------
-------------------------------------------------------------------------------- Plan name: SQL_PLAN_7qxjk7bch8h5t3652c362 Plan id: 911393634 Enabled: YES Fixed: NO Accepted: NO Origin: AUTO-CAPTURE Plan rows: From dictionary --------------------------------------------------------------------------------
Plan hash value: 2338891031
---------------------------------------------------------------- | Id | Operation | Name | ---------------------------------------------------------------- |0|SELECT STATEMENT || |1|TABLE ACCESS BY INDEX ROWID BATCHED| SPM_TEST_TAB | |2| INDEX RANGE SCAN | SPM_TEST_TAB_IDX | ----------------------------------------------------------------
SET LONG 1000000 PAGESIZE 1000 LONGCHUNKSIZE 100 LINESIZE 100 SELECT DBMS_SPM.report_evolve_task(task_name =>'TASK_1169', execution_name =>'EXEC_1281') AS output FROM dual;
OUTPUT ---------------------------------------------------------------------------------------------------- GENERAL INFORMATION SECTION ---------------------------------------------------------------------------------------------
Task Information: --------------------------------------------- Task Name : TASK_1169 Task Owner : SYS Execution Name : EXEC_1281 Execution Type : SPM EVOLVE Scope : COMPREHENSIVE Status : COMPLETED Started : 04/24/201715:04:17 Finished : 04/24/201715:04:25 Last Updated : 04/24/201715:04:25 GlobalTime Limit : 2147483646 Per-Plan Time Limit : UNUSED Number of Errors : 0 ---------------------------------------------------------------------------------------------
SUMMARY SECTION --------------------------------------------------------------------------------------------- Number of plans processed : 1 Number of findings : 1 Number of recommendations : 1 Number of errors : 0 ---------------------------------------------------------------------------------------------
DETAILS SECTION --------------------------------------------------------------------------------------------- Object ID : 2 Test Plan Name : SQL_PLAN_7qxjk7bch8h5t3652c362 Base Plan Name : SQL_PLAN_7qxjk7bch8h5tb65c37c8 SQL Handle : SQL_7b76323ad90440b9 Parsing Schema : SYS Test Plan Creator : SYS SQL Text : SELECT description FROM spm_test_tab WHERE id =99
Execution Statistics: ----------------------------- Base Plan Test Plan ---------------------------- ---------------------------- Elapsed Time (s): .000037.000005 CPU Time (s): .0000440 Buffer Gets: 50 Optimizer Cost: 132 Disk Reads: 00 Direct Writes: 00 Rows Processed: 00 Executions: 1010
Findings (1): ----------------------------- 1. The plan was verified in0.03200 seconds. It passed the benefit criterion because its verified performance was 18.01480 times better than that of the baseline plan.