ITPub博客

首页 > 数据库 > Oracle > Buffers and Full Table Scans

Buffers and Full Table Scans

原创 Oracle 作者:dawn009 时间:2015-04-04 13:58:43 0 删除 编辑

对11gR2文档中
关于Buffers and Full Table Scans中说full table scan时会将可能buffer data清除掉,看的不是很明白,欢迎有经验的学友交流分享心得:

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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-08-15

  • 博文量
    595
  • 访问量
    4988580