Beruflich Dokumente
Kultur Dokumente
ABOUT ME
KARAN DODWAL (OCM)
Over 8 years of experience with oracle technology
Oracle Certified Master DBA 11G
Oracle Database Architect
Author of OTN Articles
Oracle Certified PLSQL Developer
Oracle Database Instructor
http://karandba.blogspot.in/
http://education.oracle.com/education/otn/KDodwal.html
https://www.linkedin.com/pub/karan-dodwal-ocm/2b/b2b/765
Email :- karandodwal@gmail.com
AGENDA
Issues faced in the past without SPM
What is SPM
Architecture of SPM
Why use SPM
Managing SPM
Transporting SPM
Upgrade Strategies
Whats new in 12C
Best Practices
NIGHTMARE OF ANY DBA ?
Poor performance
Dev Team Complaints
Poor performance
Dev team complaints
Cause :- Statistics
Poor performance
Dev team complaints
Changes to schema
Introduced in 11G
Preserves the performance
Enhanced in 12C
OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES
OPTIMIZER_USE_SQL_PLAN_BASELINES
DBMS_SPM
LOADING PLANS IN BASELINES
DBA_SQL_PLAN_BASELINES
Columns :-
accepted, enabled, fixed, last_verified
DBA_SQL_MANAGEMENT_CONFIG
Columns :-
parameter_name, parameter_value
MORE INTERNAL DICTIONARY OBJECTS
# SQLOBJ$
# SQLOBJ$DATA;
# SQLOBJ$AUXDATA
# SQLLOG$
SQL STATEMENTS LOGGING
PURGING POLICY OF SPM
SPACE USAGE OF SPM
DROPPING SQL PLAN BASELINES
DROP ENTIRE SPM REPOSITORY
IMPORTING AND EXPORTING SQL PLAN
BASELINES
PACK THE STAGE TABLE
PACK A SPECIFIC BASELINE PLAN OF A QUERY
METHODOLOGY
Use dbms_Spm.report.auto_evolve_task to
view results of auto job
Auto plan evolution is part of tuning pack
SPM EVOLVE ADVISOR TASK (DBMS_SPM)
CREATE_EVOLVE_TASK
EXECUTE_EVOLVE_TASK
REPORT_EVOLVE_TASK
IMPLEMENT_EVOLVE_TASK
SET_EVOLVE_TASK_PARAMETER
AUTO EVOLVE TASK PARAMETERS
SQL MANAGEMENT BASE ENHANCEMENT
(Doc ID 287679.1)
BEST PRACTICES FOR EXECUTION PLANS
When upgrading use STS for loading plans in SPM
Gather stats after data is loaded & before indexes are created
Parallel execution should be leveraged
Use pending stats feature to minimize risk
Export statistics from PROD and import them to TEST
Get all good plans in STS and accept them all
Upgrade to 12C to leverage adaptive plans and many more
Review the plan evolution report for critical SQL’s
THANK YOU
What is the default retention period for plans in
SMB ?
SMB (SQL Management Base) uses system
tablespace for its repository.
True or False
Automatic plan evolution of SPM is part of the
Tuning Pack ?
True or False
We can use report_evolve_task function to
display results of evolve task ?
True or False