0
mysql> SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| have_query_cache | YES   |
+------------------+-------+
1 row in set (0.00 sec)

mysql> SHOW STATUS LIKE 'Qcache%';
+-------------------------+------------+
| Variable_name           | Value      |
+-------------------------+------------+
| Qcache_free_blocks      | 1          |
| Qcache_free_memory      | 1031832    |
| Qcache_hits             | 0          |
| Qcache_inserts          | 0          |
| Qcache_lowmem_prunes    | 0          |
| Qcache_not_cached       | 3097998155 |
| Qcache_queries_in_cache | 0          |
| Qcache_total_blocks     | 1          |
+-------------------------+------------+
8 rows in set (0.00 sec)

Are there any reason why cache is not being used?

3
  • 1
    How do you know if it is used or not ? Post query execution check for Handler values to determine whether used or not. Moreover, MySQL8+ has deprecated Query Cache because it does more harm than good in present context. InnoDB buffer pool is the way to go. Commented Oct 2, 2019 at 10:22
  • Seems like you already have a solution. Does it no longer valid? Commented Oct 2, 2019 at 10:30
  • 1
    "MySQL8+ has deprecated Query Cache because it does more harm than good in present context. InnoDB buffer pool is the way to go." indeed @MadhurBhaiya MySQL 8.0: Retiring Support for the Query Cache -> "Although MySQL Query Cache was meant to improve performance, it has serious scalability issues and it can easily become a severe bottleneck." Commented Oct 2, 2019 at 10:42

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.