Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1844317
  • 博文数量: 323
  • 博客积分: 5970
  • 博客等级: 大校
  • 技术积分: 2764
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-03 23:13
文章分类

全部博文(323)

文章存档

2018年(2)

2017年(11)

2016年(10)

2015年(27)

2014年(2)

2013年(30)

2012年(197)

2011年(44)

分类: Oracle

2012-05-29 10:54:12

Latch: cache buffer chains等待时间的含义:

“buffer cache中block的header是被放置到hash chains上,而hash chains又是放在hash bucket中,多个hash bucket被一个cache buffers chains latch保护。当多个session并发访问同一个数据块上的数据,每个session都要首先获得cache buffers chains latch,这样将造成cache buffers chains latch的争用。”

一、查询各等待事件的含义:

search@WEBDB>r 1 select name, parameter1, parameter2, parameter3 2 from v$event_name 3* where name like 'latch%' NAME PARAMETER1 PARAMETER2 PARAMETER3
 -------------------------------------------------- ---------- ---------- ----------
latch: cache buffers chains address number tries 
latch: redo writing address number tries 
latch: redo copy address number tries
latch: Undo Hint Latch address number tries
latch: In memory undo latch address number tries 
latch: MQL Tracking Latch address number tries
latch: row cache objects address number tries 
latch: shared pool address number tries latch: library cache address number tries 
latch: library cache lock address number tries 
latch: library cache pin address number tries latch activity address number process# latch free address number tries latch: session allocation address number tries 
latch: messages address number tries latch: enqueue hash chains address number tries 
latch: ges resource hash list address number tries 
latch: gcs resource hash address number tries 
latch: cache buffers lru chain address number tries 
latch: checkpoint queue latch address number tries 
latch: cache buffer handles address number tries 
latch: object queue header operation address number tries 
latch: object queue header heap address number tries 
latch: redo allocation address number tries 
latch: KCL gc element parent latch address number tries 
latch: undo global data address number tries 
latch: Change Notification Hash table latch address number tries 
latch: virtual circuit queues address number tries 
latch: parallel query alloc buffer address number tries

二、查询等待相关的sql语句

select sql_text, sql_fulltext, t2.sid, t2.event, t2.wait_class, t2.p1, t2.p2, t2.p3, t2.state 
from v$sqlstats t1 inner join v$session t2 on t1.SQL_ID = t2.sql_id inner join v$session_wait t3 on t2.sid = t3.sid 
where t3.wait_class <> 'Idle'

三、查询latch相关的统计数据

select latch#, name, gets, misses, sleeps 
from v$latch where latch#=98 
order by sleeps; 
select latch#,name,gets,misses,sleeps 
from v$latch 
where name like 'cache buffer%';

参考资料:

模拟试验–latch free之cache buffers chains

阅读(2213) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~