Oracle数据库中平均事务响应时间的计算公式

本文介绍了Oracle数据库中计算平均事务响应时间的方法,通过具体等待事件的统计数据进行演示,并给出计算公式。

Oracle数据库中平均事务响应时间的计算公式

 

注: 该计算公式取自:白鳝 <<oracle 优化日记>>p316

 

Top 5 Timed Events

EventWaitsTime(s)Avg Wait(ms)% Total Call TimeWait Class
direct path read327,28415,5554886.4User I/O
CPU time 1,093 6.1 
db file sequential read283,10150922.8User I/O
db file scattered read99,52018021.0User I/O
enq: TX - row lock contention274133485.7Application

 

Wait Events

  • s - second
  • cs - centisecond - 100th of a second
  • ms - millisecond - 1000th of a second
  • us - microsecond - 1000000th of a second
  • ordered by wait time desc, waits desc (idle events last)

EventWaits%Time -outsTotal Wait Time (s)Avg wait (ms)Waits /txn
direct path read327,2840.0015,5554832.66
db file sequential read283,1010.00509228.25
db file scattered read99,5200.0018029.93
enq: TX - row lock contention27498.911334850.03
log file sync6,7910.0093140.68
control file sequential read16,1680.009161.61
log file parallel write7,8160.0082100.78
name-service call wait1,1990.4268570.12

 

以"direct path read"这个等待事件为例子来计算:

A---"direct path read" 的  Total Wait Time(以ms来计算)为15555*1000=15555000ms

B---"direct path read" 的   Waits 为327284

C---"direct path read" 的   Waits /txn   为32.66

D---"direct path read" 的   % Total Call Time 为 86.4%=0.864


平均事务响应时间=A/B*C/D=15555000/327284*32.66/0.864=1796.584626 ms


 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值