码迷,mamicode.com
首页 > 系统相关 > 详细

查看library_cache 库缓冲区的命中率

时间:2015-07-30 23:05:39      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:


关于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

查看library_cache 库缓冲区的命中率

标签:

原文地址:http://www.cnblogs.com/iyoume2008/p/4690709.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!