1. select dbms_profiler.start_profiler from dual;
START_PROFILER
--------------
0
2. exec p_into_hw;
PL/SQL procedure successfully completed.
Note 1: Total Time is in seconds
Note 1: Total Time is in seconds
Note 1: Total Time is in seconds
Note 2: Min and Max Time for one execution of this line (in seconds)
Note 1: Total Time is in seconds
Note Tn: Top "n" Line in terms of Total Time
START_PROFILER
--------------
0
2. exec p_into_hw;
PL/SQL procedure successfully completed.
3. exec dbms_profiler.stop_profiler;
4.SQL> START profiler.sql //根据前面列出的run_id选择
//在运行的当前目录下会生成html文件
profiler.sql - PL/SQL Profiler (MetaLink Note:243755.1)
Profiled Run 2 (plsql_profiler_runs)
Run | Date | Total Time1 | Comment |
---|---|---|---|
2 | 09-MAR-12 10:35:06 | 33.20 | 2012-03-09 10:35:06 |
Profiled PL/SQL Libraries (plsql_profiler_units)
Unit | Owner | Name | Type | Timestamp | Total Time1 | Text Header |
---|---|---|---|---|---|---|
2 | AIKI | P_INTO_HW | PROCEDURE | 15-FEB-12 15:22:22 | 0.05 |
Top 10 profiled source lines in terms of Total Time (plsql_profiler_data)
Top | Total Time1 | Times Executed | Min Time2 | Max Time2 | Unit | Owner | Name | Type | Line | Text |
---|---|---|---|---|---|---|---|---|---|---|
1 | 0.05 | 1 | 0.05 | 0.05 | 2 | AIKI | P_INTO_HW | PROCEDURE | 4 | insert into hw_contention |
Note 2: Min and Max Time for one execution of this line (in seconds)
Unit:2 AIKI.P_INTO_HW (all_source)
Line | Total Time1 | Times Executed | Text |
---|---|---|---|
1 | 0.00 | 0 | PROCEDURE "P_INTO_HW" |
2 | as | ||
3 | begin | ||
4T1 | 0.05 | 1 | insert into hw_contention |
5 | select event,p1,p2,p3 from | ||
6 | v$session_wait | ||
7 | where event='enq: HW - contention' | ||
8 | union all | ||
9 | select event,p1,p2,p3 from | ||
10 | v$session_wait@gxdb1 | ||
11 | where event='enq: HW - contention'; | ||
12 | 0.00 | 1 | commit; |
13 | 0.00 | 1 | end; |
14 |
Note Tn: Top "n" Line in terms of Total Time