MRU replacement strategy

MRU (fetch-and-discard) is most often used for queries where a page is needed only once by the query, including:

MRU replacement strategy is used for table scanning on heap tables. This strategy places pages into the cache just before the wash marker, as shown in Figure 2-3.

Figure 2-3: MRU strategy places pages just before the wash marker

Image shows a line of pages, from the MRU to the LRU, with a new page being placed just before the wash area.

Placing the pages needed only once at the wash marker means they do not push other pages out of the cache.

The fetch-and-discard strategy is used only on pages actually read from the disk for the query. If a page is already in cache due to earlier activity on the table, the page is placed at the MRU end of the cache.

Figure 2-4: Finding a needed page in cache

Image shows a line of pages, from the MRU to the LRU, with a page moving from just before the wash area to the beginning of the MRU area.