现象:生产环境CPU居高不下
通过分析数据库活动会话:
select s.SID, s.SERIAL#, 'kill -9 ' || p.SPID, s.MACHINE, s.OSUSER, s.PROGRAM, s.USERNAME, s.last_call_et, a.SQL_ID, s.LOGON_TIME, a.SQL_TEXT, a.SQL_FULLTEXT, w.EVENT, a.DISK_READS, a.BUFFER_GETS from v$process p, v$session s, v$sqlarea a, v$session_wait w where p.ADDR = s.PADDR and s.SQL_ID = a.sql_id and s.sid = w.SID and s.STATUS = 'ACTIVE' order by s.last_call_et desc;
查看164LATCH的信息
2:11:59 PM SQL> select name,gets,misses,sleeps from v$latch where sleeps >0 order by sleeps desc;
NAME GETS MISSES SLEEPS
---------------------------------------------------------------- ---------- ---------- ----------
simulator hash latch 4827860212 135426899 10890947
cache buffers chains 1619822817 2850976006 4747728
gc element 4660052091 25748270 175073
resmgr:schema config 91872524 153968 95708
ges resource hash list 174151449 1070556 55459
Real-time plan statistics latch 40953155 651496 44527
call allocation 3301878 265908 43501
row cache objects 336300485 4970324 19366
simulator hash latch是个什么鬼?