dbms_profiler简单例子

来源:互联网 发布:ws小世界网络 编辑:程序博客网 时间:2024/05/23 00:54
1. select dbms_profiler.start_profiler from dual;

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)

RunDateTotal Time1Comment209-MAR-12 10:35:0633.202012-03-09 10:35:06Note 1: Total Time is in seconds

Profiled PL/SQL Libraries (plsql_profiler_units)

UnitOwnerNameTypeTimestampTotal Time1Text Header2AIKIP_INTO_HWPROCEDURE15-FEB-12 15:22:220.05 Note 1: Total Time is in seconds

Top 10 profiled source lines in terms of Total Time (plsql_profiler_data)

TopTotal Time1Times ExecutedMin Time2Max Time2UnitOwnerNameTypeLineText10.0510.050.052AIKIP_INTO_HWPROCEDURE4insert into hw_contentionNote 1: Total Time is in seconds
Note 2: Min and Max Time for one execution of this line (in seconds)

Unit:2 AIKI.P_INTO_HW (all_source)

LineTotal Time1Times ExecutedText10.000PROCEDURE "P_INTO_HW"2  as3  begin4T10.051insert into hw_contention5  select event,p1,p2,p3 from6  v$session_wait7  where event='enq: HW - contention'8  union all9  select event,p1,p2,p3 from10  v$session_wait@gxdb111  where event='enq: HW - contention';120.001commit;130.001end;14   Note 1: Total Time is in seconds
Note Tn: Top "n" Line in terms of Total Time


原创粉丝点击