 |
|
11g SQL Performance Analyzer and
Tuning Features
Oracle 11g New Features Tips by Burleson
Consulting
July 13, 2008 |
Oracle 11g SQL New Features Tips
Oracle 10g introduced several major performance
enhancements, many of them in the form of advisors and automatic
features. The new analysis available with 10g allowed a Remote DBA to
locate the root cause of their performance issues and drill down
into waits and bottlenecks. Those abilities have been enhanced in
Oracle 11g, using analytic data built into the AWR in new ways.
For instance, many of the performance features
of Oracle 10g allowed reactive analysis, and limited forecasting and
proactive tuning. Oracle 11g introduces new tools that allow
full-scale proactive tuning, maintenance, and testing. One of the
most comprehensive tools available for 11g that assists with all
three of these goals is the SQL Performance Analyzer.
A trip to the SPA – Inside the 11g SQL Performance Analyzer
The declarative nature of the SQL syntax has
always made it difficult to perform SQL tuning. The basic tenet of
cost-based SQL optimization is that the person who writes a SQL
query simply "declares" what columns they want to see (the SELECT
clause), the tables where the columns reside (the FROM clause), and
the filtering conditions (the WHERE clause). It's up to the SQL
optimizer to always determine the optimal execution plan. This is a
formidable challenge, especially in a dynamic environment, which is
why Oracle introduced the 10g new feature of CBO dynamic sampling.
Oracle tuning consultants have known for many
years that the best way to tune an Oracle system is to take a
top-down approach, finding the optimal configuration for external
factors (i.e. OS kernel settings, disk I/O subsystem), and
determining the best overall setting for the Oracle instance (i.e. init.ora parameters).
Holistic tuning involves tuning a
representative workload, adjusting global parameters in order to
optimize as much SQL as possible. Only then, is it prudent to start
tuning individual SQL statements. Many Oracle professional who
adopt a bottom-up approach (tune the SQL first), find all of their
hard-work un-done when a change is made to a global setting, such as
one of the SQL optimizer parameters or recomputing optimizer
statistics.
Oracle’s holistic
SQL tuning approach is new, and given the misleading marketing name
"fully automated SQL tuning". Holistic tuning is well-known to
working Remote DBA's who have been doing manual workload-based optimization
since Oracle 6. Now in 11g, Oracle gives us an automated method.
The Oracle 11g SQL Performance Analyzer (SPA),
is primarily designed to speed up the holistic SQL tuning process,
automating much of the tedium.
Once you create a workload (called a SQL Tuning
Set, or STS), Oracle will repeatedly execute the workload, using
sophisticated predictive models (using a regression testing
approach) to accurately identify the salient changes to execution
plans, based on your environmental changes.
Using SPA, we can predict the impact of system
changes on a workload, and we can forecast changes in response times
for SQL after making any change, like parameter changes, schema
changes, hardware changes, OS changes, or Oracle upgrades; any
change that influence SQL plans is a good candidate for SPA.
 |
This is an
excerpt from the new book
Oracle 11g New Features: Expert Guide to the Important
New Features by John Garmany, Steve Karam, Lutz Hartmann, V. J.
Jain, Brian Carr.
You can buy it direct from the publisher
for 30% off. |