Chinaunix首页 | 论坛 | 博客
  • 博客访问: 928332
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-03-09 17:36:38

--oracle数据库系统中Library、Latch、Buffer三大关键指标的命中率统计sql,目标值是100%:
--Library Hit
select round(sum(pinhits)/sum(pins)*100,2) "Library Hit(%)"
from v$librarycache;
--Latch Hit
select round((1-sum(misses)/sum(gets))*100,2) "Latch Hit(%)"
from v$latch;
--Buffer Hit
select round(100*(1-(a.value-b.value-nvl(c.value,0))/d.value),2) "Buffer Hit(%)"
from v$sysstat a,v$sysstat b,v$sysstat c,v$sysstat d
where a.name='physical reads'
and b.name='physical reads direct'
and c.name='physical reads direct (lob)'
and d.name='session logical reads';
阅读(766) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~