当前位置:操作系统 > Unix/Linux >>

OCP考题解析_043:buffer cache和命中率

OCP考题解析_043:buffer cache和命中率
 
计算方法:
         www.zzzyk.com  
       SELECT name, (1-(physical_reads/(db_block_gets+consistent_gets)))*100 H_RATIO FROM v$buffer_pool_statistics;
       
       命中率作为衡量db性能的标准已经是老皇历了,如今都是通过 oracle  wait  interface 了
       命中率可以作为一个参考,但是命中率高低和系统性能高低没有必然的联系,只是一个侧面
       
       而且单看命中率,很多时候不能说明问题,最好和之前的对比查看
       比如每天的某个时刻,要从OLTP向OLAP拉数据,会有全扫描某些表的操作
       此时,物理读的量会上升,…………,等等
       如果每天的此段时间命中率都低,同时又没有看到有价值的等待事件,哪就暂时不会有性能问题   www.zzzyk.com  
       
       所以,别太关注命中率参数!如果命中率不怎么地,但性能还是不错,可以不必理会。关键要看用户是否满意!
       
       If the buffer cache is too smalll for your system,
       you will see "free buffer waits" in the v$system_event table. And that is the better place to check.
       
       如果命中率确实低得令人发指,那么或许你该尝试检查Top N(SQL或Event) 
       
       下面以Top SQL为例
       发现Top SQL的方法很多,最常用的方法是statspack报告中查找Top SQL,另外,OEM Top SQL工具OEM SQL Aanlyzer
       10gADDM还可以根据SQL对系统的影响度,对Top SQL进行排序,找到Top SQL后,可以立即使用优化向导进行优化分析
       
       OCP考题:
[sql] 
1.You observe that a database performance has degraded over   
a period of time. While investigating the reason, you find the size of   
the database buffer cache is not large enough to cache all the needed data   
blocks. Which advisory component wold you refer to, in order todetermine   
that required size of the database buffer cache?   
  
A. Memory Advisor   
B. Segment Advisor   
C. SQL Tuning Advisor   
D. SQL Access Advisor   
E. Automatic Database Diagnostic Monitor(ADDM)   
  
Answer: A   
 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,