對緩存命中率的疑問﹖
這兩天﹐我跑了一段代碼
select to_Char(snap_time,'yyyy-mm-dd hh24') mydate,
(((new.consistent_Gets-old.consistent_Gets) + (new.db_block_gets - old.db_block_gets))-
(new.physical_reads - old.physical_reads))/
((new.consistent_gets - old.consistent_gets ) +
(new.db_block_gets - old.db_Block_Gets)) bhr
from stats$buffer_pool_statistics old,
stats$buffer_pool_statistics new,
stats$snapshot sn
where new.name = old.name and new.snap_id = sn.snap_id
and old.snap_id = sn.snap_id - 1
我發現就在兩天之內﹐命中率最高是99.99%,而最低是50%,而且與服務齊的繁忙的時候總體來說﹐命中率要高一些﹐在凌晨時﹐命中率要低一些﹐我想在通過緩存命中率的大小來決定是否增加共享池時﹐我們所要采集的數據僅僅是在服務器在有負載的情況下﹐是否﹖
|