查看library_cache 库缓冲区的命中率

关于library cache的命中率:
    SQL> desc V$librarycache
    NAMESPACE                                        VARCHAR2(64)
    GETS                                                NUMBER
    GETHITS                                             NUMBER
    GETHITRATIO                                        NUMBER
    PINS                                                 NUMBER
    PINHITS                                              NUMBER
    PINHITRATIO                                         NUMBER
    RELOADS                                             NUMBER
    INVALIDATIONS                                       NUMBER
    DLM_LOCK_REQUESTS                                 NUMBER
    DLM_PIN_REQUESTS                                   NUMBER
    DLM_PIN_RELEASES                                    NUMBER
    DLM_INVALIDATION_REQUESTS                        NUMBER
DLM_INVALIDATIONS                                    NUMBER

计算library cache的命中率:
    NAMESPACE=SQL AREA
    Library Cache Hit Ratio = sum(pinhits) / sum(pins)  以下语句计算librarycache 命中率

库缓存区的命中率应保持在95%,否则应考虑增大shared_pool_size
 
SYS @ prod >SELECT SUM(pins) "Executions",SUM(reloads) "CacheMisses while Executing", ROUND((SUM(pins)/(SUM(reloads)+SUM(pins)))*100,2)   "HitRatio, %" FROM V$LIBRARYCACHE;

Executions       CacheMisses while Executing         HitRatio, %
---------- --------------------------- ------------------------ ------------------------ -----------
 131527               2472                         98.16

上一篇:BZOJ4143 [AMPPZ2014]The Lawyer


下一篇:perl 使用cookie