Implementing and Using the PL/SQL Profiler
When there is a significant gap between user elapsed time and SQL
processing elapsed time, and there is PL/SQL code involved, the PL/SQL
Profiler becomes a very useful tool. It helps to identify the
lines of PL/SQL code which are taking longer to process.
For example, if a transaction which uses PL/SQL Libraries (packages,
procedures, functions or triggers) executes in one hour of user
elapsed time, and reviewing the results of the Trace Analyzer (<>) or
TKPROF only 10 minutes of the elapsed time can be explained with SQL
commands being executed, then, by using the PL/SQL Profiler, a
line-by-line of the executed PL/SQL application code is reported,
including the
total execution time for each line of code, and how many times
each of these lines was executed.
The actual PL/SQL Profiler is provided with the core RDBMS code, and it is
well documented on the
Supplied PL/SQL Packages and Types Reference
manual, under the package name DBMS_PROFILER. This <>
is about implementing and using the PL/SQL
Profiler on any 8i or higher instance, in order to debug the performance of any
PL/SQL application Library. This Note can be used on any Oracle
Applications instance using 8i or higher, but its use is not restricted to
solely Oracle Apps.The main script provided in this Note
(profiler.sql) generates a comprehensive HTML report on the
performance data extracted by the DBMS_PROFILER package. |