• Home
  • MySQL’s query cache vs memcached

MySQL’s query cache vs memcached

January 17, 2014 Ning 0 Comments

I did some research about MySQL’s query cache. Some people said it will speed up page load times by 5-15%.

Query cache is used to cache SELECT results and later return them without actual executing the same query once again. Having the query cache enabled may result in significant speed improvements, But if tables change very often or if your queries are textually different every time, the query cache may result in a slowdown instead of a performance improvement.

When using memcached to cache MySQL data, your application must retrieve data from the database and load the appropriate key-value pairs into the cache. Then, subsequent lookups can be done directly from the cache.

Because MySQL has its own in-memory caching mechanisms for queried data, such as the InnoDB buffer pool and the MySQL query cache, look for opportunities beyond loading individual column values or rows into the cache. Prefer to cache composite values, such as those retrieved from multiple tables through a join query, or result sets assembled from multiple rows.

leave a comment

*