将经常使用的表放置在db_keep_cache_size中减少物理读
2014-02-20 14:26
363 查看
以下转自:http://www.itpub.net/thread-1809208-2-1.html 作者:zcs0237
一、设置KEEP池SYS@zcs11G> alter system set db_keep_cache_size=32m scope=spfile;shutdown immediate;show parameter db_keep--db_keep_cache_size big integer 32M二、查看数据库中已经有那些表被标记为热点表SYS@zcs11G> select '--',owner,segment_type,segment_name,buffer_pool from dba_segments where buffer_pool != 'DEFAULT';-- no rows selected![]() 三、设置t11表的storage(buffer_pool keep)属性SYS@zcs11G> drop table t11 purge;create table t11 as select level id,lpad('z',4000,'z') name from dual connect by level <= 5000;alter table t11 storage(buffer_pool keep);select '--',bytes/1024/1024,'MB' from dba_segments where segment_name='T11';-- 40 MB四、查看是否在缓存keep中SYS@zcs11G> set pagesize 0set autotrace offcol segment_name for a12select '--',segment_name,buffer_pool from dba_segments where buffer_pool != 'DEFAULT';-- T11 KEEPSYS@zcs11G> set linesize 999select '--',a.status, count(*) from V$BH a, user_objects b where a.objd=b.object_id and object_name='T11' group by object_name, a.status;-- xcur 5001 T11中的数据已经全部放入KEEP池五、体会keep池的优势SYS@zcs11G> set autotrace trace statistics;select count(*) from t11; Statistics---------------------------------------------------------- 140 recursive calls 0 db block gets 5090 consistent gets 5000 physical reads SYS@zcs11G> select count(*) from t11;Statistics---------------------------------------------------------- 0 recursive calls 0 db block gets 5008 consistent gets 0 physical reads |
相关文章推荐
- db_keep_cache_size 表cache
- db_keep_cache_size参数的控制范围测试
- oracle 缓存db_keep_cache_size
- db_cache_size 优化
- RAC中增大db_cache_size引发的ORA-04031错误
- 合理使用缓存减少对服务器的访问之Cache-Control
- oracle db_nk_cache_size
- Oracle10g数据缓冲区(DB_CACHE_SIZE)
- db_cache_size 参数优化
- 合理使用缓存减少对服务器的访问之Cache-Control
- DB_cache_size
- Oracle_学习笔记_查看ORACLE11G中 db_cache_size shared_pool_size等参数
- 合理使用缓存减少对服务器的访问之Cache-Control
- Java中经常使用缓存Cache机制的实现
- 合理使用缓存减少对服务器的访问之Cache-Control
- oracle 10g中db_cache_size
- 合理使用缓存减少对服务器的访问之Cache-Control
- 设置windows2008系统缓存大小限制,解决服务器运行久了因物理内存耗尽出僵死(提升权限后,使用SetSystemFileCacheSize API函数,并将此做成了一个Service)
- 添加db_16k_cache_size后,db不能mount
- 合理使用缓存减少对服务器的访问之Cache-Control