 |
|
Oracle Tips by Burleson |
Prerequisites to Collecting
SQL Trace Data
There are a couple prerequisite parameters
that must be addressed no matter which method is used for enabling
tracing. Timed statistics must be enabled in order to get timing
information about the process. Timed statistics can be enabled at
startup using the pfile or spfile. In the pfile, set the parameter
to timed_statistics = TRUE, while the spfile could be updated with
the following command:
ALTER SYSTEM SET TIMED_STATISTICS = TRUE
SCOPE=BOTH;
In the early days of Oracle, possibly as
recently as version 7, using this parameter had a negative impact,
reportedly around 10%, on database performance. However, since
version 8 and definitely in 9i and 10g, if there is any performance
impact, it is widely believed to not be measurable.
In spite of this, Metalink documentation
still appears to be divided on this issue. The reference note for
this parameter states, “Normally, timed_statistics should be
false.” Meanwhile note 30824.1, states that the small amount of
overhead from tuning this tracing on is worth the benefits gained.
In the face of this ambiguity from Oracle,
many Remote DBAs choose to leave this to TRUE on an instance-wide level for
most databases. The exception to this is when a bug is impacting
normal operations and cannot be patched.
It can also be enabled with either an ALTER
SYSTEM or ALTER SESSION call at any time for either a specific
session or the whole instance. There are a few ways to accomplish
this, but only two ways are shown here. These should work for most
installations.
The above book excerpt is from:
Oracle Wait Event Tuning
High Performance with Wait
Event Interface Analysis
ISBN 0-9745993-7-9
Stephen Andert
http://www.rampant-books.com/book_2004_2_wait_tuning.htm |