latch: row cache objects

本文探讨了数据库中 Rowcache Objects Latch 的作用及如何分析其引起的性能问题。介绍了几种 SQL 查询方法来诊断和定位 Rowcache Objects Latch 的等待事件,帮助读者理解 Latch 的工作原理,并提供了解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

如果有latch: row cache objects等待事件,那么会导致CPU很高,主机和数据库响应都很慢。和Rowcache及其相关Latch的视图主要有:v$latch_children,v$rowcache.

Row cache objects latch用来保护数据字典缓冲区的,进程在装载、引用或者清除数据字典缓冲区中的对象时必须获得该latch。Latch不会造成阻塞,只会导致等待。 阻塞是一种系统设计上的问题,等待是一种系统资源争用的问题。

Row cache objects latch: 当用户进程访问缓存的数据字典数值时,将使用Row cache objects latch。

 

分析用的SQL:

select addr,latch#,child#,level#,name,gets, misses, sleeps 
from v$latch_children 
where name='row cache objects' and gets<>0 order by gets;


select "WHERE", sleep_count, location
from v$latch_misses
where parent_name='row cache objects'
and sleep_count>0;
select distinct 
r.cache#,
r.parameter    name,
r.type,
r.subordinate#,
r.gets
from v$rowcache r
order by 1, 4, 5;
select parameter,sum("COUNT"),sum(usage),sum(gets),sum(getmisses),sum(scans),sum(scanmisses),sum(modifications),sum(dlm_requests),sum(dlm_conflicts),sum(dlm_releases)
from v$rowcache
group by parameter;

alter session set events 'immediate trace name row_cache level  level# ';

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值