Professional Documents
Culture Documents
Tuning
The tools available to help you diagnose and resolve performance issues depend to a certain
extent on the version of the database you are using. Oracle 10g and upwards have more
tools available than earlier versions. In general the tools available include:
SQL trace
TKPROF
SQL Trace
SQL trace is an Oracle database facility that provides individual performance information
about SQL statements either at the instance or session level.
The information gathered about SQL statements comprises:
Wait event data for each SQL statement, and a summary for each trace file
If the statement's cursor is closed, row source information is also provided including:
TKPROF
TKPROF is a program that is run against
Oracle trace files to format them and generate
a readable output. It can also:
DBMS_STATS package
The DBMS_STATS package provides a number
of routines for generating and manipulating
statistics on tables and indexes in the
database. These statistics are then used by
the Oracle cost-based optimizer when
determining the optimal execution plan for
SQL statements.
DBMS_SPM
This package enables you to manage SQL
execution plans to ensure that the plan and
therefore the performance of the
corresponding SQL statements are unchanged
irrespective of any changes to the system
such as more data, a new version of the
Oracle database, or new applications.
DBMS_OUTLN
This package enables the management of
stored outlines (stored data for an an
execution plan for a specific SQL statement)
in the Oracle database. It enables the
Oracle optimizer to re-create an execution plan equivalent to the original plan. In future
releases of Oracle this will be deprecated in favour of SQL plan management (DBMS_SPM).