oracle中WAIT TIME 和 CPU TIME

(原创)
DB time =DB wait time +DB CPU time
DB Time
Tuning is not just about reducing waits. Its goal is to improve end-user response time and/or minimize the average resources used by each individual request. Sometimes these
go together, and in other cases there is a trade-off (for example, parallel query). In general,we can say that tuning is the avoidance of consuming or holding resources in a wasteful manner.
Any request to the database is composed of two distinct segments: a wait time (DB waittime) and a service time (DB CPU time). The wait time is the sum of all the waits for various resources. The CPU time is the sum of the time that is spent actually working on the request or waiting on the OS run queue. These times are not necessarily composed of one wait and one block of CPU time.
Tuning consists of reducing or eliminating the wait time and reducing the CPU time.
This definition applies to any application type: online transaction processing (OLTP) or
data warehouse (DW).
Note: A very busy system shows longer DB CPU time due to waits on the run queue.
An overloaded system causes processes
以上是ORACLE 文档上给出的概念
以前经常在AWRRPT中看到CPU TIME 排在TOP5 EVENT的第一位,一直都不太清楚准确意思。这里给出了,CPU TIME就是实际执行或者等待操作系统运行队列所需要的时间,这里操作系统运行队列应该就是等待CPU时间片队列吧。但是还不准确,大概就可以理解是做实际操作需要的时间(比如进行SQL分析,执行,取回)。。
  然后说了优化的目的,就是减少等待时间,比如减少ENQ锁等待,减少执行时间,比如减少逻辑读啊,游标共享啊。当然在OLTP和OLAP的优化不一样,OLAP一般瓶颈在大量的读,这个时候使用绑定变量视乎效果不好。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7728585/viewspace-680729/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7728585/viewspace-680729/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值