Understanding MySQL Query Caches and when to implement it?
Posted
by
Jeff
on Server Fault
See other posts from Server Fault
or by Jeff
Published on 2011-11-18T17:33:39Z
Indexed on
2011/11/18
17:53 UTC
Read the original article
Hit count: 176
On our current MySQL server query cache is enabled.
Qchache_hits: 31913
Qchache_inserts: 50959
Qchache_lowmem_prunes: 9320
Qchache_not_chached: 209320
Qchache_queries_in_chace: 986
com_update: 0
com_delete: 0
I do not fully understand the Query cache - I am reading about it currently and trying to understand it.
Our database holds inventory data, customer data, employee data, sales data and so forth. The query is very rarely run more than once. The possibility of a query being run twice is viewing a specific sales information twice. But basically everything in our system changes constantly. It is always being updated, deleted, insterted and off the top of my head I can't picture users running the same query twice within a week.
Do I even need to have the query cache enabled? I am guessing that the inserts means 51k entries have been added, but only 986 of those are being stored?
Would an idea be to refresh the cache, and watch it for a week and check how many of the queries in cached are accessed maybe on a weekly basis to see if it is actually returning any benefits?
Any help/guidance on this is appreciated, thanks
© Server Fault or respective owner