Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.86 sec)
MYSQL cache causes speed decrease ?

I have a site that I enabled this on:



query_cache_size = 268435456

query_cache_type=1

query_cache_limit=1048576


from here: http://www.cyberciti.biz/faq/mysql-set-cache-size/" target=_blank title="http://www.cyberciti.biz/faq/mysql-set-cache-size/\">http://www.cyberciti.biz/faq/mysql-set-cache-size/">http://www.cyberciti.biz/faq/mysql-set-cache-size/" title="http://www.cyberciti.biz/faq/mysql-set-cache-size/\">http://www.cyberciti.biz/faq/mysql-set-cache-size/" target=_blank>http://www.cyberciti.biz/ ...

If anything I'm seeing a slight decrease in page load speed. Any thoughts welcome.
Asked by:
BonoEstente
1464 points
 Report Abuse
 Share Page - Category: Linux Servers - Tags: MYSQL cache causes speed decrease ?
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (3)

Best Answer

The first thing to recognize is that query caching makes sense only if your web application is making lots of identical queries and retrieving identical datasets therefrom. If your app uses prepared statements, then even so the cache won't operate. It's a good idea to review the principle on which the query cache works: see

http://dev.mysql.com/doc/refman/5.0/en/query-cache.html

I note that you are reserving a bit over 250 MiB for the cache. How much memory does your server have going spare? If things get busy, it could be that this cache is hogging memory that would be better used for other things; if anything causes your cache to get swapped out, then the whole object will be defeated.

Response by:
CPKS
225 points
I would suggest playing with the values a little and trying remote speed tests.

Response by:
BonoEstente
1464 points
Thanks, I'll look further into it.

Response by:
BonoEstente
1464 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle