select 1-(sum(decode(name,'physical reads',value, 0))/(sum(decode(name, 'db block gets', value, 0))+(sum(decode(name, 'consistent gets', value, 0))))) from v$sysstat
select sum(gets), sum(getmisses),(1-(sum(getmisses)/(sum(gets)+sum(getmisses))))*100 hitrate from v$rowcache
select sum(pins) "executions", sum(pinhits) "hits", ((sum(pinhits)/sum(pins))*100) "PinHitRatio", sum(reloads) "misses", ((sum(pins)/(sum(pins)+sum(reloads)))*100) "RelHitRatio"
from v$librarycache
select b.username username, a.disk_reads reads, a.executions exec, a.disk_reads/decode(a.executions, 0, 1, a.executions) rds_exec_ratio, a.sql_text statement from v$sqlarea a, dba_usrs b where a.parsing_user_id=b.user_id and a.disk_reads>10000 order by a.disk_reads desc
select a.sid, a.username, s.sql_text from v$session a, v$sqltext s where a.sql_address=s.address and a.sql_hash_value=s.hash_value order by a.username,a.sid, s.piece
select a.sid, a.username, b.owner, b.object, b.type from v$session a, v$access b where a.sid=b.sid
select username, count(*) from v$session group by username
select a.file#, a.name, a.status, a.bytes, b.phyrds, b.phywrts from v$datafile a, v$filestat b where a.file$=b.file#
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/37724/viewspace-152500/ ,如需转载,请注明出处,否则将追究法律责任。