(1)data dictionary cache hit ratio
select * from v$rowcache
select sum(gets)/(sum(gets)+sum(getmisses)) from v$rowcache where gets+getmisses<>0
(2)individual row cache parameter hit ratio
select parameter,gets,getmisses,modifications,flushes,(gets/(gets+getmisses))*100 hisratio
from v$rowcache where gets+getmisses>0
(3) library cache hit ratio
select * from v$librarycache
select * from v$library_cache_memory
select sum(pins),sum(reloads),sum(pins)/(sum(pins)+sum(reloads)) from v$librarycache --命中率
(4)individual library cache parameter hit radtio
select namespace, pins, pinhits, pinhitratio, reloads, reloads
/decode(pins,0,1,pins) reloadratio
from v$librarycache
(5) Using the X$KSMSP Table to Get a Detailed Look at the Shared Pool
select sum(ksmchsiz) size,ksmchcls status from x$ksmsp group by ksmchcls
Status Possible Meaning
Free This is the amount of contiguous free memory available.
Freeabl Freeable but not flushable shared memory; currently in use.
Perm I have read that this is permanently allocated and non-freeable memory,
but in testing this, I find that it behaves as free memory not yet moved to
the free area for use.
Recr Allocated memory that is flushable when the shared pool is low on memory.
R-free This is SHARED_POOL_RESERVED_SIZE (default 5 percent of SP).
R-freea This is probably reserved memory that is freeable but not flushable.
R-recr Recreatable chucks of memory in the reserved pool.
R-perm Permanent chucks of memory in the reserved pool.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-731710/
,如需转载,请注明出处,否则将追究法律责任。