'The LRU Algorithm and Full Table Scans
When the user process is performing a full table scan, it reads the blocks of the table
into buffers and puts them on the LRU end (instead of the MRU end) of the LRU
list. This is because a fully scanned table usually is needed only briefly, so the blocks
should be moved out quickly to leave more frequently used blocks in the cache.
You can control this default behavior of blocks involved in table scans on a
table-by-table basis. To specify that blocks of the table are to be placed at the MRU
end of the list during a full table scan, use the CACHE clause when creating or
altering a table or cluster. You can specify this behavior for small lookup tables or
large static historical tables to avoid I/O on subsequent accesses of the table.'
--from concept
上面的文档意思是说:对该表作FTS时,cache选项指定表是写入LRU LIST的MRU的一端。
如果想把表装入到内存中,其实是这样一个过程:
1. alter table test storage(buffer_pool keep);(执行完后内存中并没有表的数据)
2. 当查询test表时,查询到的数据块才会保存在keep pool中,如果是FTS,那么所有的数据就都保存在内存中了。
不知道我的理解对不对?
另外,alter table test nocache storage(buffer_pool keep);
执行了这个,查询的时候还会同时放入内存中一份么?
怎么测试一下?
那就是说不管cache=y还是n,对于FTS来说,影响是存入LRU的哪一端;那么对于非FTS呢?
'CACHE VARCHAR2(5) Whether the cluster is to be cached in the buffer cache
(CACHE | NOCACHE)'
-- 9iR2 Reference ALL_TABLE
对于上面这个怎么解释呢?