Query cache != bad!!

January 14th, 2010 by Keith Murphy Leave a reply »

*** I wrote this in late September last year and it has languished in my draft folder. Man, I should pay more attention to such things!! Sorry for the delay.

A couple of people have written lately about the query cache.

Konstantin wrote here Marc wrote here.

Konstantin believes the query cache should be removed from the server. Mark didn’t make any recommendations one way or the other — although he did post tests that show that the performance can fluctuate quite a bit according to version. While I would absolutely say you should monitor and test your setup there are cases where it can make a dramatic difference. I just looked at a configuration on a client’s server where the query cache was enabled and serving over 3,000 queries a second from cache. Yes, from cache. In the same week I have seen another client’s configuration where the query cache was slowing things up and I recommended that the QC be turned off.

As with all configuration changes you make to a server, you should always monitor the results of the change. The results of your changes may or may not be what you expect. I for one would say the QC should stay right where it is .. turned off by default and available for your use if you so desire. Additional intelligence built into the query cache would be nice but it is useful in many cases as is.

Advertisement

Leave a Reply