Database Reference
In-Depth Information
A report generated by the previous query that advises to use a SQL profile looks like the following. Note that
this is an excerpt of the output generated by the profile_opt_estimate.sql script. The first section shows general
information about the analysis and the SQL statement. The second section shows findings and recommendations. In
this case, the advice is to accept a SQL profile. The last section shows the execution plans before and after applying
the advice:
GENERAL INFORMATION SECTION
-------------------------------------------------------------------------------
Tuning Task Name : TASK_3401
Tuning Task Owner : CHRIS
Workload Type : Single SQL Statement
Scope : COMPREHENSIVE
Time Limit(seconds): 42
Completion Status : COMPLETED
Started at : 08/02/2013 15:31:44
Completed at : 08/02/2013 15:31:45
-------------------------------------------------------------------------------
Schema Name: CHRIS
SQL ID : bczb6dmm8gcfs
SQL Text : SELECT * FROM t1, t2 WHERE t1.col1 = 666 AND t1.col2 > 42 AND
t1.id = t2.id
-------------------------------------------------------------------------------
FINDINGS SECTION (1 finding)
-------------------------------------------------------------------------------
1- SQL Profile Finding (see explain plans section below)
--------------------------------------------------------
A potentially better execution plan was found for this statement.
Recommendation (estimated benefit: 65.35%)
------------------------------------------
- Consider accepting the recommended SQL profile.
execute dbms_sqltune.accept_sql_profile(task_name => 'TASK_3401',
task_owner => 'CHRIS', replace => TRUE);
-------------------------------------------------------------------------------
EXPLAIN PLANS SECTION
-------------------------------------------------------------------------------
1- Original With Adjusted Cost
------------------------------
Plan hash value: 2452363886
 
Search WWH ::




Custom Search