1

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?

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.