Server Fault is a question and answer site for system and network administrators. 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

What's the relation between:

innodb_buffer_pool_size and query_cache_*

Both are use for caching queries but what's the difference? Can I use both?

Thank you

share|improve this question
up vote 3 down vote accepted

Buffer pool is for caching retrieved table and index data in memory, query cache just caches the parsed mysql queries. The former is much larger and usually far more important. Sure you can use both.

share|improve this answer
The query cache does not cache queries, it caches result sets from queries. (but the rest is correct). (cf Oracle where queries and their execution plans are cached). – symcbean May 30 '12 at 12:33
Thanks for adding that. Sorry I missed the result set, but in mysql the queries are cached along with the result set. – johnshen64 May 30 '12 at 13:13

innodb_buffer_pool_size = caches the tables for better response times

query_cache = for remembering queries to get them faster the next time you execute the same query

share|improve this answer
No, the innodb_buffer_pool caches rows of data read, not tables. – symcbean May 30 '12 at 12:34

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.