Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am wondering what type of queue is MySQL Query Cache using.
When there is new query and cache is full which query is deleted? Oldest one? One with fewer number of hits? Or maybe there is some different logic behind that?

I tried to find something in documentation, but without success.

share|improve this question
up vote 2 down vote accepted

According to the manual, the query cache removes the Least Recently Used (LRU) Query from the Query Cache when the Query Cache is full. Read the general chapter on the MySQL Query Cache for a more detailed description of the logic and architecture of the Query Cache.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.