||Oracle Tips by Burleson
Chapter 7 - Tuning and Performance
OCP Instructors Guide for
Oracle DBA Certification
The cost based optimizer uses statistics generated by the
dbms_stats procedure or the ANALYZE
statement as the situational data when creating its expert opinion
on which access path to the data is most optimal. These statistics
are stored in the data dictionary and describe the objects space
characteristics, data uniqueness and data distribution.
The cost-based optimizer is only as good as the
statistics it uses as input. Statistics collections should be run
on a regular basis to ensure that the statistics are current
(representative of the data being accessed). The optimizer is then
able to create a highly accurate access path that is based on the
least cost. If statistics are not available, the optimizer uses a
simple algorithm to calculate the statistics, which often leads to
“less than optimal” access paths. In other words, Oracle guesses
and it is usually not a very good guesser.
Oracle 9i Release 2 introduces optimizer
dynamic sampling to overcome the lack of accurate statistics on the
objects being accessed. The optimizer is now able to take a
sampling of the data during access path optimization.
Administrators are able to activate dynamic sampling and control the
size of the dynamic sample taken by using the
optimizer_dynamic_sampling dynamic initialization parameter as a throttle.
The above text is
an excerpt from:
OCP Instructors Guide for Oracle DBA Certification
A Study Guide to Advanced Oracle Certified Professional Database
by Christopher T. Foot
Download your Oracle scripts now:
definitive Oracle Script collection for every Oracle professional DBA