On Centos 6.3 I’m trying to enable query caching on Mysql.
I have enabled query caching
SHOW VARIABLES LIKE 'query_cache_size';
query_cache_size 52428800
SHOW VARIABLES LIKE 'query_cache_type';
query_cache_type ON
When running a few simple select queries (select * from titles), the Qcache_hits always stays 0.
(I’m using these sample mysql database: https://launchpad.net/test-db/+download)
show status like "Qcache%";
Qcache_free_blocks 1
Qcache_free_memory 52419904
Qcache_hits 0
Qcache_inserts 0
Qcache_lowmem_prunes 0
Qcache_not_cached 50
Qcache_queries_in_cache 0
Qcache_total_blocks 1
I’m out of options figuring out what’s wrong here.
Does anyone have an idea what can be wrong?
You probably missed the query_cache_limit option, which prevents resultsets larger than this from being cached.
You may also have a non-standard setting for query_cache_type.