
When buffers must be read from disk, the database inserts the buffers into the middle of the LRU list. In this way, hot blocks can remain in the cache so that they do not need to be read from disk again.
A problem is posed by a full table scan, which sequentially reads all rows under the table high water mark (see "Segment Space and the High Water Mark").
Suppose that the total size of the blocks in a table segment is greater
than the size of the buffer cache. A full scan of this table could
clean out the buffer cache, preventing the database from maintaining a
cache of frequently accessed blocks.
Blocks read into the database cache as the result of a full scan of a
large table are treated differently from other types of reads. The
blocks are immediately available for reuse to prevent the scan from
effectively cleaning out the buffer cache.
In the rare case where the default behavior is not desired, you can change the CACHE attribute of the table. In this case, the database does not force or pin the blocks in the buffer cache, but ages them out of the cache in the same way as any other block. Use care when exercising this option because a full scan of a large table may clean most of the other blocks out of the cache.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29119536/viewspace-1486528/ ,如需转载,请注明出处,否则将追究法律责任。