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.
当用户进行全表扫描时 ,读取数据库至buffer , 并且把他们放在lru末尾 , 以便尽快将这些数据块
age out, 可以用cache语句将该表存在于MRU .
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-978177/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10599713/viewspace-978177/
在全表扫描过程中,为了快速释放缓存空间,通常会将数据块放置在LRU列表的末尾。但可以通过设置CACHE选项,在创建或修改表时指定将数据块放置在MRU位置,适用于小型查询表或大型静态历史表,减少后续访问的I/O操作。
2164

被折叠的 条评论
为什么被折叠?



