MySQL 5.5.9 Query Cache not working.
        Posted  
        
            by 
                thepearson
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by thepearson
        
        
        
        Published on 2011-03-12T23:43:03Z
        Indexed on 
            2011/03/13
            0:12 UTC
        
        
        Read the original article
        Hit count: 531
        
I am running MySQL 5.5.9 x86_64 RPM as downloaded from mysql.com. Running on CentOS 5.5 Xen DomU.
I have enabled the Query_cache however MySQL NEVER uses it. All of my tables are InnoDB. Why is the Qcache never hit?
Here are my settings.
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 5.5.9     |
+-----------+
1 row in set (0.00 sec)
mysql> SHOW VARIABLES LIKE '%query_cache%';
+------------------------------+-----------+
| Variable_name                | Value     |
+------------------------------+-----------+
| have_query_cache             | YES       |
| query_cache_limit            | 2097152   |
| query_cache_min_res_unit     | 4096      |
| query_cache_size             | 536870912 |
| query_cache_type             | ON        |
| query_cache_wlock_invalidate | OFF       |
+------------------------------+-----------+
6 rows in set (0.00 sec)
mysql> show status like 'Qcache%';
+-------------------------+-----------+
| Variable_name           | Value     |
+-------------------------+-----------+
| Qcache_free_blocks      | 1         |
| Qcache_free_memory      | 536852824 |
| Qcache_hits             | 0         |
| Qcache_inserts          | 0         |
| Qcache_lowmem_prunes    | 0         |
| Qcache_not_cached       | 7665775   |
| Qcache_queries_in_cache | 0         |
| Qcache_total_blocks     | 1         |
+-------------------------+-----------+
8 rows in set (0.00 sec)
        © Server Fault or respective owner