select 'LIBRARY CACHE MISS' as name, to_char(round(sum(reloads)*100/sum(pins),3), 'B90D999') || '%' as value from v$librarycache union all select 'DICTIONARY CACHE MISS', to_char(round(sum(getmisses)*100/sum(gets),3), 'B90D999') || '%' from v$rowcache union all select 'BUFFER CACHE HIT', to_char(round((1-(physget/(blockget + consistget)))*100,3), 'B90D999') || '%' from (select to_number(value) physget from v$sysstat where upper(name) = 'PHYSICAL READS') pr, (select to_number(value) blockget from v$sysstat where upper(name) = 'DB BLOCK GETS') dbg, (select to_number(value) consistget from v$sysstat where upper(name) = 'CONSISTENT GETS') cg union all select 'LOG INFORMATION', log_mode from v$database union all select 'AVERAGE LOGSWITCHES PER DAY', to_char(round(nlogswitches/to_number(lasttime - firsttime) ,2), '9990D99') from (select count(*) nlogswitches from v$loghist), (select first_time lasttime from v$loghist where sequence# = ( select max(sequence#) from v$loghist)), (select first_time firsttime from v$loghist where sequence# = ( select min(sequence#) from v$loghist));
30. Januar 2015