资源描述:
《数据缓冲区命中率》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1、数据缓冲区命中率:51Testing软件测试网,eO9w2X2@SQL>selectvaluefromv$sysstatwherename='physicalreads';51Testing软件测试网tlWt*A
2、C3WV[SQL>selectvaluefromv$sysstatwherename='physicalreadsdirect';}J~&t7M,nFW0SQL>selectvaluefromv$sysstatwherename='physicalreadsdirect(lob)';0K[E"C8kAD{6W0SQL>selectvaluefro
3、mv$sysstatwherename='consistentgets';[0Gl7KT_^l0SQL>selectvaluefromv$sysstatwherename='dbblockgets';51Testing软件测试网$uF3H"U1SaY这里命中率的计算应该是51Testing软件测试网P[w7p7~%q*}fj令x=physicalreadsdirect+physicalreadsdirect(lob)51Testing软件测试网1{V$jl6l!N"]h命中率=100-(physicalreads-x)/(consistentgets+d
4、bblockgets-x)*10051Testing软件测试网e*YrWfPw'SQ+
5、通常如果发现命中率低于90%,则应该调整应用可可以考虑是否增大数据缓冲区51Testing软件测试网$zk:bQ^W2、共享池的命中率:L/]%Wg.d`$?fW0SQL>selectsum(pinhits-reloads)/sum(pins)*100"hitradio"fromv$librarycache;51Testing软件测试网tKEdg�{s7}(jGN假如共享池的命中率低于95%,就要考虑调整应用(通常是没使用bindvar)或者增加内存selectsize_
6、for_estimate,estd_physical_read_factor,estd_physical_readsfromv$db_cache_adviceselect*fromv$shared_pool_adviceSELECTshared_pool_size_for_estimate"SizeofSharedPoolinMB",shared_pool_size_factor"SizeFactor",estd_lc_time_saved"TimeSavedinsec"FROMv$shared_pool_advice;select*fromv$sga_targ
7、et_adviceSELECTround(pga_target_for_estimate/1024/1024,2)"PGA(MB)",pga_target_factor,estd_pga_cache_hit_percentage,estd_overalloc_countFROMv$pga_target_advice;-----------查看PGA的大小建议selectpga_target_for_estimate"size",pga_target_factor"factor",estd_extra_bytes_rw/1000000"extraMbr/w",es
8、td_overalloc_count"overalloctions"fromv$pga_target_advice;----------db_cache_advice建议值-------SELECT size_for_estimate,buffers_for_estimate, estd_physical_read_factor,estd_physical_readsFROMV$DB_CACHE_ADVICEWHERE name='DEFAULT'AND block_size=
9、 (SELECTvalueFROMV$PARAMETER WHEREname='db_block_size')AND advice_status='ON';---------------shared_pool_advice 建议值----selectSHARED_POOL_SIZE_FOR_ESTIMATE"poolsize", SHARED_POOL_SIZE_FACTOR"poolsizefactor", ESTD_LC_SIZE"estdlcsize", ESTD_LC_MEMORY_OBJECTS"estd
10、lcmemobj",