db_keep_cache_size

使用:
1:手动分配keep buffer pool size 
SQL> alter system set db_keep_cache_size=4m;

2:修改需要keep 在内存中的表的存储参数
SQL> alter table a storage(buffer_pool keep);

查看表属性
SQL> select table_name,buffer_pool from user_tables where table_name='A';
TABLE_NAME       BUFFER_
------------------------------ -------
A                              KEEP

3:查看keep buffer pool 使用情况
SQL> select p.name,a.cnum_repl "total buffers",a.anum_repl "free buffers" from x$kcbwds a, v$buffer_pool p
where a.set_id=p.LO_SETID and  p.name='KEEP';
NAME              total buffers      free buffers
--------------------    -------------             ------------
KEEP                     496                      0


If you dynamically disable SGA_TARGET by setting its value to 0 at instance startup, Automatic Shared Memory Management will be disabled and the current auto-tuned sizes will be used for each memory pool. If necessary, you can manually resize each memory pool using the DB_CACHE_SIZE, SHARED_POOL_SIZE, LARGE_POOL_SIZE, JAVA_POOL_SIZE, and STREAMS_POOL_SIZEinitialization parameters. 

The following pools are manually sized components and are not affected by Automatic Shared Memory Management:

  • Log buffer

  • Other buffer caches (such as KEEP, RECYCLE, and other nondefault block size)

  • Fixed SGA and other internal allocations

To manually size these memory pools, you must set the DB_KEEP_CACHE_SIZE, DB_RECYCLE_CACHE_SIZE, DB_nK_CACHE_SIZE, and LOG_BUFFER initialization parameters. The memory allocated to these pools is deducted from the total available for SGA_TARGET when Automatic Shared Memory Management computes the values of the automatically tuned memory pools.


buffer cache =  default pool  +  keep pool ( db_keep_cache_size)  +  recycel pool ( db_recycle_cache_size )
default pool =   db_cache_size + db_nk_cache_ size



查看buffer cahce size

SQL> select value/1024/1024 buffers from v$sga where name='Database Buffers';

   BUFFERS
    ----------
       160

查看db_nk_cache_size,db_keep_cache_size,db_recycle_cache_size

SQL> show parameter db%cache%size

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
db_16k_cache_size     big integer 12M
db_2k_cache_size     big integer 0
db_32k_cache_size     big integer 0
db_4k_cache_size     big integer 0
db_8k_cache_size     big integer 0
db_cache_size     big integer 0
db_flash_cache_size     big integer 0
db_keep_cache_size     big integer 4M
db_recycle_cache_size     big integer 12M

查看db_cache_size:
SQL> SELECT x.ksppinm NAME,y.ksppstvl/1024/1024 VALUE, x.ksppdesc describ FROM SYS.x$ksppi x, SYS.x$ksppcv y WHERE x.indx = y.indx AND x.ksppinm LIKE '%__db_cache_size%';

NAME                  VALUE             DESCRIB
--------------------       ------       --------------------------------------------------
__db_cache_size     132        Actual size of DEFAULT buffer pool for standard block size buffers

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

转载于:http://blog.itpub.net/21998432/viewspace-1401947/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值