[Oracle Script] Buffer Cache Hit Ratio
select to_char(sysdate,'yyyy/mm/dd hh24:mi:ss') currenttime,round(1-(physical_read-physical_reads_direct)/(db_block_gets+consistent_gets-physical_reads_direct),4)*100 "Buffer Cache Hit Ratio",
buffer_busy_waits,free_buffer_waits
from (SELECT TO_CHAR(SYSDATE, 'yyyy/mm/dd hh24:mi:ss') Time, s.*, e.*
FROM (SELECT SUM(decode(name, 'physical reads', VALUE)) physical_read,
NVL(SUM(decode(name, 'physical reads direct', VALUE)), 0) physical_reads_direct,
SUM(decode(name, 'db block gets', VALUE)) db_block_gets,
SUM(decode(name, 'consistent gets', VALUE)) consistent_gets
FROM v$sysstat
WHERE name IN ('physical reads', 'db block gets', 'consistent gets', 'physical reads direct')) s,
(SELECT NVL(SUM(decode(e.event, 'buffer busy waits', e.total_waits)), 0) buffer_busy_waits,
NVL(SUM(decode(e.event, 'free buffer waits', e.total_waits)), 0) free_buffer_waits
FROM v$system_event e
WHERE e.event IN ('buffer busy waits', 'free buffer waits')) e)
buffer_busy_waits,free_buffer_waits
from (SELECT TO_CHAR(SYSDATE, 'yyyy/mm/dd hh24:mi:ss') Time, s.*, e.*
FROM (SELECT SUM(decode(name, 'physical reads', VALUE)) physical_read,
NVL(SUM(decode(name, 'physical reads direct', VALUE)), 0) physical_reads_direct,
SUM(decode(name, 'db block gets', VALUE)) db_block_gets,
SUM(decode(name, 'consistent gets', VALUE)) consistent_gets
FROM v$sysstat
WHERE name IN ('physical reads', 'db block gets', 'consistent gets', 'physical reads direct')) s,
(SELECT NVL(SUM(decode(e.event, 'buffer busy waits', e.total_waits)), 0) buffer_busy_waits,
NVL(SUM(decode(e.event, 'free buffer waits', e.total_waits)), 0) free_buffer_waits
FROM v$system_event e
WHERE e.event IN ('buffer busy waits', 'free buffer waits')) e)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2143822/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Buffer Cache Hit Ratio
- why Buffer Cache Hit Ratio < 0
- [Oracle Script] Library Cche Hit RatioOracle
- Hit Ratio For ORACLEOracle
- Cursor Cache Hit Ratio超過100%
- Keeping the Library Cache Reload Ratio at 0 and the Hit Ratio Above 95 Percent
- Keeping the Data Dictionary Cache Hit Ratio at or above 95 Percent
- Oracle Buffer Cache原理Oracle
- Oracle database buffer cacheOracleDatabase
- Oracle Cache Buffer ChainsOracleAI
- 【BUFFER】Oracle buffer cache之 latch 學習記錄Oracle
- oracle buffer cache管理機制_buffer cache dump與lru機制小記Oracle
- Oracle Buffer Cache原理總結(一)Oracle
- Oracle Buffer Cache原理總結(二)Oracle
- 關於計算buffer cache hit rate的精確演算法演算法
- Oracle中flush buffer cache和x$bhOracle
- Buffer Cache 原理
- cache buffer chainAI
- Oracle 11g buffer cache的設定Oracle
- Oracle中Buffer Cache記憶體結構Oracle記憶體
- IO之核心buffer----"buffer cache"
- CACHE BUFFER CHAINSAI
- Database Buffer Cache (79)Database
- oracle buffer cache管理機制之lruw_dbwrOracle
- oracle實驗記錄 (buffer_cache分析(1))Oracle
- page cache與buffer cache的關係
- linux cache and buffer【轉】Linux
- Latch: cache buffer chains (%)AI
- BUFFER CACHE尋找流程
- buffer cache logical structure!Struct
- buffer cache部分原理(LRU)
- Organization of the Database Buffer Cache (80)Database
- Size of the Database Buffer Cache (82)Database
- 關於ORACLE裡的buffer cache 的命中率Oracle
- 33、buffer_cache_3(redo的產生、LRBA、buffer cache裡的等待事件)事件
- oracle實驗記錄 (buffer_cache分析(2)cbc latch)Oracle
- buffer與cache的區別
- database buffer cache之我見Database