052-012題解析

pxbibm發表於2014-03-31
 

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部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-1133293/,如需轉載,請註明出處,否則將追究法律責任。

相關文章