如果有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;