dbms_profiler简单例子

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 Time1Comment
209-MAR-12 10:35:0633.202012-03-09 10:35:06
Note 1: Total Time is in seconds

Profiled PL/SQL Libraries (plsql_profiler_units)

UnitOwnerNameTypeTimestampTotal Time1Text Header
2AIKIP_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 Time2UnitOwnerNameTypeLineText
10.0510.050.052AIKIP_INTO_HWPROCEDURE4insert into hw_contention
Note 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 ExecutedText
10.000PROCEDURE "P_INTO_HW"
2  as
3  begin
4T10.051insert 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';
120.001commit;
130.001end;
14   
Note 1: Total Time is in seconds
Note Tn: Top "n" Line in terms of Total Time


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值