Keeping the Library Cache Reload Ratio at 0 and the Hit Ratio Above 95 Percent
For optimal performance, you’ll want to keep the library cache reload ratio [sum(reloads) /sum(pins)] at zero and the library cache hit ratio above 95 percent. If the reload ratio is not zero, then there are statements that are being “aged out” that are later needed and brought back into memory. If the reload ratio is zero (0), that means items in the library cache were never aged or invalidated. If the reload ratio is above 1 percent, the SHARED_POOL_SIZE parameter should probably be increased. Likewise, if the library cache hit ratio comes in below 95 percent, then the SHARED_POOL_SIZE parameter may need to be increased.
The following query uses the V$LIBRARYCACHE view to examine the reload ratio in the library cache:
select
Sum(Pins) "Hits", Sum(Reloads) "Misses",((Sum(Reloads) / Sum(Pins)) * 100)"Reload %"
from V$LibraryCache;
The next query uses the V$LIBRARYCACHE view to examine the library cache’s hit ratio in detail:
select
Sum(Pins) "Hits", Sum(Reloads) "Misses", Sum(Pins) / (Sum(Pins) + Sum(Reloads)) "Hit Ratio"
from V$LibraryCache;
Using a modified query on the same table, we can see how each individual parameter makes up the library cache. This may help diagnose a problem or show overuse of the shared pool.
set numwidth 3
set space 2
set newpage 0
set pagesize 58
set linesize 80
set tab off
set echo off
ttitle 'Shared Pool Library Cache Usage'
column namespace format a20 heading 'Entity'
column pins format 999,999,999 heading 'Executions'
column pinhits format 999,999,999 heading 'Hits'
column pinhitratio format 9.99 heading 'Hit|Ratio'
column reloads format 999,999 heading 'Reloads'
column reloadratio format .9999 heading 'Reload|Ratio'
select namespace, pins, pinhits, pinhitratio, reloads, reloads/decode(pins,0,1,pins) reloadratio
from v$librarycache;
The following query uses the V$LIBRARYCACHE view to examine the reload ratio in the library cache:
select
Sum(Pins) "Hits", Sum(Reloads) "Misses",((Sum(Reloads) / Sum(Pins)) * 100)"Reload %"
from V$LibraryCache;
The next query uses the V$LIBRARYCACHE view to examine the library cache’s hit ratio in detail:
select
Sum(Pins) "Hits", Sum(Reloads) "Misses", Sum(Pins) / (Sum(Pins) + Sum(Reloads)) "Hit Ratio"
from V$LibraryCache;
Using a modified query on the same table, we can see how each individual parameter makes up the library cache. This may help diagnose a problem or show overuse of the shared pool.
set numwidth 3
set space 2
set newpage 0
set pagesize 58
set linesize 80
set tab off
set echo off
ttitle 'Shared Pool Library Cache Usage'
column namespace format a20 heading 'Entity'
column pins format 999,999,999 heading 'Executions'
column pinhits format 999,999,999 heading 'Hits'
column pinhitratio format 9.99 heading 'Hit|Ratio'
column reloads format 999,999 heading 'Reloads'
column reloadratio format .9999 heading 'Reload|Ratio'
select namespace, pins, pinhits, pinhitratio, reloads, reloads/decode(pins,0,1,pins) reloadratio
from v$librarycache;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-598233/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Keeping the Data Dictionary Cache Hit Ratio at or above 95 Percent
- why Buffer Cache Hit Ratio < 0
- Buffer Cache Hit Ratio
- [Oracle Script] Buffer Cache Hit RatioOracle
- [Oracle Script] Library Cche Hit RatioOracle
- Cursor Cache Hit Ratio超過100%
- Hit Ratio For ORACLEOracle
- MetricMeasurement calculates Peak Signal-to-Noise RatioREM
- oracle分析函式之ratio_to_reportOracle函式
- Oracle Reporting 1 - Ratio_to_Report FunctionOracleFunction
- SAP Portfolio Analyzer 中 夏普比率(Sharpe Ratio)計算
- -webkit-min-device-pixel-ratio: 2是什麼意思?WebKitdev
- Library Cache Pin 及 Library Cache Lock分析
- library cache lock和library cache pin理解
- SAP TRM模組中Portfolio Analyzer 中特雷諾指數(Treynor ratio)計算
- oracle library cache之library cache lock_library cache pin wait event釋義OracleAI
- BIP 下 RTF 模板中求欄位比率方法及ratio_to_report
- Oracle Library cacheOracle
- library cache pin和library cache lock的診斷分析
- library cache lock和library cache pin區別總結
- CBO,ORACLE,隱含引數,_sort_elimination_cost_ratio的含義Oracle
- 定位Library Cache pin,Library Cache lock等待的解決方法
- zt_如何平面解決library cache lock和library cache pin
- 【等待事件】library cache pin事件
- 等待事件--library cache pin事件
- library cache pin等待分析
- LIBRARY CACHE LOCK 等待事件事件
- library cache pin 等待事件事件
- 解決Library Cache latchs
- 【ASK_ORACLE】Library Cache概念篇(二)之Library Cache Pin的定義Oracle
- zt_如何使用event 10049分析定位library cache lock and library cache pin
- latch:library cache lock等待事件事件
- oracle異常:library cache lockOracle
- 深入理解shared pool共享池之library cache的library cache lock系列四
- 深入理解shared pool共享池之library cache的library cache pin系列三
- [20240824]跟蹤library cache lock library cache pin使用gdb.txt
- Library Hit %: -986.64 負數的問題
- R plot 柵格地圖時 設定 asp引數代表"寬高比"(Aspect Ratio) 畫素大小地圖