Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

11g Integration of SQL Plan Management with Automatic SQL Tuning

Oracle 11g New Features Tips by Donald BurlesonJune 29, 2015

Oracle 11g New Features Tips

The next step is also already implemented in Oracle database 11g. It is called Automatic SQL Tuning. With this feature enabled, Oracle runs an automatic task job every night in a maintenance window. It is also called Automatic SQL Tuning Advisor and searches for high load SQL, then starts automatically tuning the worst statements. Output could be recommendations about missing indexes for instance, and if allowed, automatic implementation of automatically created and tested SQL Profiles. This is not enabled by default. The job would then feed the SQL plan baselines with the plans from the automatically created and implemented SQL profiles and mark the new plans as ENABLED and ACCEPTED.

The SYS_AUTO_SQL_TUNING_TASK runs in the daily maintenance window and can be monitored with the data dictionary view DBA_ADVISOR_EXECUTIONS. The Automatic SQL Tuning job can be managed via the built in package DBMS_AUTO_TASK_ADMIN. The choice can also be made to not fix the plan in the new baseline and allow the optimizer from now on to evolve the plan baseline and use new best cost plans found for the statement, but only if it has been verified that they do not cause performance regression.

If the Automatic Tuning job finds a better plan and implements a SQL Profile automatically and automatic implementation of SQL Profiles has been allowed, it adds the new plan to the plan baseline but does not verify existing unaccepted plans. The criteria for automatic implementation of SQL profiles and feeding new plans into the plan baselines would be that the improvement of the new plan sums up to at least three times less cost (sum of CPU and I/O time). Only High Load Repeatable SQL is automatically tuned. Who cares about low load SQL?

The syntax to enable Automatic SQL Tuning is as follows:

LUTZ AS SYSDBA @ prod11g1 SQL> BEGIN

dbms_sqltune.set_tuning_task_parameter('SYS_AUTO_SQL_TUNING_TASK', 'ACCEPT_SQL_PROFILES', 'TRUE');

END;

% The default value for ACCEPT_SQL_PROFILES is FALSE!

It is also possible to adjust the Automatic SQL Tuning Task in the graphical interface:

Figure 29:  Automatic SQL Tuning Settings Screen

For more detailed information on Automatic SQL Tuning, please refer to Chapter 6 in this book.

There have been multiple techniques to control execution plans available for quite a while. These include hints, stored outlines and SQL profiles. What all of these methods have in common is that they need manual intervention since they are fixed remedies which do not adjust to changed demands automatically. Also, they can only be used after the problem has actually occurred, so they are reactive methods.

SQL Plan management is a proactive approach to possible upcoming problems and can help to ensure that performance regression is prevented and only execution plans which are significantly better than the ?well tuned and well known? plans can be used by the optimizer.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.