Pergunta

I ran the following sql against MySQL:

SHOW STATUS LIKE 'Qcache%';

Here is what I got:

Qcache_free_blocks  0
Qcache_free_memory  0
Qcache_hits 0
Qcache_inserts  0
Qcache_lowmem_prunes    0
Qcache_not_cached   0
Qcache_queries_in_cache 0
Qcache_total_blocks 0

I don't understand why I get this because I did double-check that the query cache is properlty enabled as follows:

SHOW VARIABLES LIKE 'have_query_cache';

Variable_name   Value
have_query_cache    YES

Can anyone please help?

Foi útil?

Solução

Have you read the MySQL Query Cache Configuration page?

E.g.

When using a standard MySQL binary, this value is always YES, even if query caching is disabled.

or

To set the size of the query cache, set the query_cache_size system variable. Setting it to 0 disables the query cache. The default size is 0, so the query cache is disabled by default. To reduce overhead significantly, also start the server with query_cache_type=0 if you will not be using the query cache.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top