Memory Architecture (contd)
- Least recently used (LRU) policy is used for buffer management. When read it is moved to the ‘most recently used’ end of the list. If not used again it moves to the ‘least recently used’ end of the list.
- Full table scan : requires different strategy. Would monopolize all buffers removing blocks from other tables. Such scans should put their buffers at the LRU end of the list so that they get immediately reused.
- But for full scan of small tables which are accessed repeatedly, LRU is still better. Create tables with CACHE keyword so that their blocks are retained in buffer after a table scan.