在建表时将频繁使用并且需要大量i/o操作的表,建议放入buffer_pool keep 池当中,可以最小化检索表中数据块所需要的i/o。

    1. 建表是添加
    2. SQL> create table s1 (name varchar2(10)) storage (BUFFER_POOL KEEP);
    3. Table created.
    4. 修改缓存池
    5. SQL> alter table s1 storage (buffer_pool recycle);
    6. Table altered.
    7. 取消表缓存
    8. SQL> alter table s1 nocache;
    9. Table altered.
    10. 设置默认缓存区缓存
    11. SQL> alter table s1 cache; = alter table s1 storage (buffer_pool default);
    12. Table altered.
    13. 查看keep池大小
    14. SQL> show parameter keep
    15. NAME TYPE VALUE
    16. ------------------------------------ ----------- ------------------------------
    17. buffer_pool_keep string
    18. control_file_record_keep_time integer 7
    19. db_keep_cache_size big integer 20M
    20. 修改keep池大小
    21. SQL> alter system set db_keep_cache_size=20m;
    22. System altered.