Chapter2_basics

For this reason, the caching algorithm I'm describing is often called an LRU caching algorithm.
缓存算法经常被称为LRU缓存算法。最不常用,最冷的数据会自动的从缓存中falls off;
The theory is that the hottest data will cycle to the head of the list and therefore live longer on the list. Really hot data might never leave the list at all.
most recently used (MRU)
least recently used (LRU)

When, more commonly, the database finds a data block it needs already in the cache (requiring pure logical I/O), it removes that block from its current location and relocates it to the head of the list. Since a block involved in a logical I/O is just moved rather than added to the list, no block is pushed off the tail of the list. Again, the database handles the logical block move by pointers; it doesn't physically copy the data within memory.


Small tables and indexes (tables with fewer than 10,000 rows and indexes with fewer than 90,000 entries)

large tables (tables holding over 1,000,000 rows)

你可能感兴趣的:(算法,cache)