1. 程式人生 > 其它 >oracle 調優引數,oracle效能優化引數調整

oracle 調優引數,oracle效能優化引數調整

oracle 調優引數,oracle效能優化引數調整

於2021-04-04 07:25:16釋出192收藏 文章標籤:oracle 調優引數

1.SHARE_POOL_SIZE

資料字典的命中率計算:

select((1 - (Sum(GetMisses) / (Sum(Gets) + Sum(GetMisses)))) * 100) "Hit Rate"

from V$RowCache

whereGets+ GetMisses <> 0;

資料字典的命中率低於95%可考慮提升SHARE_POOL_SIZE

LIBRARY CACHE(reload)的命中率計算:

selectSum(Pins) "Hits",Sum(Reloads) "Misses",((Sum(Reloads) / Sum(Pins)) * 100)"Reload %"

from V$LibraryCache;

LIBRARY CACHE的命中率計算:

select Sum(Pins) "Hits",Sum(Reloads) "Misses",Sum(Pins) / (Sum(Pins) + Sum(Reloads)) "Hit Ratio"

from V$LibraryCache;

LIBRARY CACHE(reload)的命中率高於1%或LIBRARY CACHE命中率低於95%可考慮增大SHARE_POOL_SIZE

2.db_cache_size

data cache hit ratio計算:

select sum(decode(name,'physical reads',value,0)) phys,

sum(decode(name,'db block gets',value,0)) gets,sum(decode(name,'consistent gets', value,0)) con_gets,

(1 - (sum(decode(name,'physical reads',value,0)) /

(sum(decode(name,'db block gets',value,0)) +

sum(decode(name,'consistent gets',value,0))))) * 100 hitratio

from v$sysstat;

一般可讓命中率保持95%以上

可通過檢視V$DB_CHCHE_ADVICE檢視,確定要不要調整

NAME       SIZE_FOR_ESTIMATE SIZE_FACTOR  ESTD_PHYSICAL_READ_FACTOR

--------------------    -----------------      -----------      -------------------------

DEFAULT         4        .1667 1        .8136

DEFAULT         8        .3333         1.0169

DEFAULT        12         .5          1.0085

DEFAULT        16         .6667           1

DEFAULT       20 .8333            1

DEFAULT 24 1 1

由上可看出ESTD_PHYSICAL_READ_FACTOR達到1時SIZE_FOR_ESTIMATE 為16,而當前的值為(SIZE_FACTOR)列24,因此可考慮適當減少DB_CACHE_SIZE.