ITPub博客

首页 > 数据库 > Oracle > 052-012题解析

052-012题解析

Oracle 作者:RAYSUNNNY 时间:2014-05-10 11:59:07 0 删除 编辑
 

12.

Which is the correct description of a pinned buffer in the database buffer cache?

A.The buffer is currently being accessed.

B.The buffer is empty and has not been used.

C.The contents of the buffer have changed and must be flushed to the disk by the DBWn process.

D.The buffer is a candidate for immediate aging out and its contents are synchronized with the block contents on the disk.

Answer: A

答案解析:

问题是哪个是正确描述数据库缓冲区高速缓存中的一个固定缓存区(pinned)。
在高速缓存中的缓冲区可以被“钉”在一个固定缓存区中,使之不被老化。
8i以前,db_cache_size,buffer_pool_keep, buffer_pool_recycle这三种buffer cache是独立指定的,互不制约。而8i以后,这三种buffer cache是有相互制约关系的。如果指定了keep和recycle的buffer cache,则default类型的buffer cache的大小就是db_cache_size - buffer_pool_keep - buffer_pool_recycle。
    通常将经常访问的对象放入keep类型的buffer cache里,而将不常访问的大表放入recycle类型的buffer cache里。其他没有指定buffer cache类型的对象都将进入default类型的buffer cache里。为对象指定buffer cache类型的方法如下:
Sql>alter system set db_keep_cache_size=500m scope=both;先设置,然后再keep
SQL> create table test (n number) storage (buffer_pool keep) ;
SQL> create table test (n number) storage (buffer_pool keep) cache;
SQL> alter table test storage (buffer_pool recycle);
但事实上,它们之间在管理和内部机制上没有任何的区别。它们仅仅是为DBA们提供了一个选择,就是能够将数据库对象分成“非常热的”、“比较热的”和“不热的”这三种类型。
识别热点对象
  select object_type mytype, object_name myname ,  blocks,  count(1) buffers,  avg(tch) avg_touches
  from  sys.x$bh a, dba_objects b, dba_segments s
  where  a.obj=b.object_id  and  b.object_name=s.segment_name  and b.owner not in('SYS','SYSTEM')
  GROUP BY object_name,object_type, blocks,obj
  having avg(tch)>5  and count(1)>20;
  识别出热点对象后,可以决定将对象隔离放入keep池中

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29227735/viewspace-1158013/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-12-05

  • 博文量
    38
  • 访问量
    242778