db_keep_cache_size 表cache

db_keep_cache_size :是否将表保存在内存中

表cache:将表放在data buffer的最常使用端,尽量避免被T出buffer,跟算法MRU和LRU有关,为两个概念;


下面是来自ASKTOM摘录内容

You Asked

Hi, 
Is it enough if we use 
ALTER TABLE <table_name> CACHE; to push the table to cache ?. 
Do I need to do anything else to have the table in the Memory ?
 
Thx, VJ 

and we said...

That command simply makes a notation in the data dictionary that blocks from this table 
should be handled differently when they get into the cache.  Usually, when we full scan 
an object, we put the blocks onto the least recently end of the list.  These blocks are 
candidates for "aging" from the buffer cache.  By altering the table to 'cache', we put 
the blocks onto the most recently used end -- making them less prone to being aged out of 
the buffer cache.

From the sql reference manual we see:

...
for data that is accessed frequently, specifies that the blocks retrieved for this table 
are placed at the most recently used end of the LRU list in the buffer cache when a full 
table
scan is performed. This attribute is useful for small lookup tables. 
...

So, no -- issueing the alter table ... cache command does not put the table into memory, 
you must full scan the table for that to happen.

Consider looking into setting up multiple buffer pools and associating this table with 
its own buffer pool if you are dead serious about caching it.  Bufrer pools are 

<quote tuning manual>
Schema objects are referenced with varying usage patterns; therefore, their cache 
behavior may be quite different. Multiple buffer pools enable you to address these 
differences. You can use a KEEP buffer pool to maintain objects in the buffer cache
and a RECYCLE buffer pool to prevent objects from consuming unnecessary space in the 
cache. When an object is allocated to a cache, all blocks from that object are placed in 
that cache. Oracle maintains a DEFAULT buffer pool for objects that have
not been assigned to one of the buffer pools.
</quote>

Bear in mind tho... there is really no true way to a have a purely "in memory" table -- 
even cached tables are subject to aging from the buffer cache. 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值