6、 '%' 2.FROM V$SGASTAT 3.WHERE NAME = 'free memory' AND POOL = 'shared pool'; 其中:&TSP_IN_M是你的总的共享池的SIZE(M)共享池内存使用率,应该稳定在75%-90%间,太小浪费内存,太大则内存不足。查询空闲的共享池内存:1.SQL>SELECT * FROM V$SGASTAT 2.WHERE NAME = 'free memory' AND POOL = 'shared pool'; 3)db
8、 NAME='DEFAULT'; 通常应在90%以上,否则,需要调整,加大DB_CACHE_SIZE另外一种计算命中率的方法(摘自ORACLE官方文档<<数据库性能优化>>):命中率的计算公式为:1.Hit Ratio = 1 - ((physical reads - physical reads direct - physical reads direct (lob)) / (db block gets + 2.consistent gets - physical reads direct -
9、 physical reads direct (lob)) 分别代入上一查询中的结果值,就得出了Buffercache的命中率1.SQL>SELECT NAME, VALUE 2.FROM V$SYSSTAT 3.WHERE NAME IN('session logical reads', 4.'physical reads', 1.'physical reads direct', 2.'physical reads direct (lob)', 3.'db block gets', 'cons
10、istent gets'); 4)数据缓冲区命中率:1.SQL> select value from v$sysstat where name ='physical reads'; 2.SQL> select value from v$sysstat where name ='physical reads direct'; 3.SQL> select value from v$sysstat where name ='physical reads direct (lob)'; 4.SQL> se
11、lect value from v$sysstat where name ='consistent gets'; 5.SQL> select value from v$sysstat where name = 'db block gets'; 这里命中率的计算应该是令x=physicalreadsdirect+physicalreadsdirect(lob)命中率=100-(physicalreads-x)/(consistentgets+dbblockgets-x)*100通常如果发现命中率低