December 2010
Intermediate to advanced
451 pages
11h 16m
English
You notice that a PL/SQL program is running slowly, and you need to identify what sections of the code are causing it to perform poorly.
Use the DBMS_PROFILER routines to analyze the code and find potential bottlenecks. In the following example, the profiler is used to collect statistics on a run of a program, and then a query displays the statistics.
EXEC DBMS_PROFILER.START_PROFILER ('Test1', 'Testing One');
EXEC sync_hr_data; -- the procedure identifed has having a bottleneck
EXEC DBMS_PROFILER.FLUSH_DATA;
EXEC DBMS_PROFILER.STOP_PROFILER;
Now that the profile data is collected, you can query the underlying tables to see the results of the analysis:
COL line# FORMAT 999 COL hundredth FORMAT ...Read now
Unlock full access