4

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

5

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

| improve this answer | |
  • 2
    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
  • 1
    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
0

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

| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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