>>>>> "Bob" == Bob Kline <bkline@stripped> writes:
Bob> On Wed, 13 Oct 1999 sinisa@stripped wrote:
>> It does. Oldest get's out. The one that has spent most of the time,
>> and not being used is thrown out to make space for the new one.
>> The newest one has no chance of being thrown out with a next entry.
>> That is FILO. It is similar to LRU.
Bob> first-in last-out (FILO): A queuing discipline in which entities in
Bob> a queue leave the queue in the reverse order from that in which they
Bob> This means that if you have a queue with three elements A, B, and C, for
Bob> which A arrived first, B arrived second, and C arrived third, the items
Bob> will leave the queue in the order C, B, A. For a cache this means that
Bob> you are discarding C first, instead of A, which is the least-recently
Bob> used (LRU). For a DBMS (such as MySQL) this is almost always a less
Bob> useful approach than one in which the least-recently used keys are
Bob> discarded first when the cache needs to free up some space.
Bob> Does this help?
The MySQL key cache isn't a strict queue as keys may be reordered if
you hit a row that is already in the queue. The method is strictly
'oldest accessed key_buffer gets out'.