Solved

MySQL Query Cache isn't working.

Posted on 2011-02-19
2
522 Views
Last Modified: 2012-06-27
Hey everyone,

I can't seem to get query caching to work by default, which i would imagine it should. Is there something I'm missing here? Any help would be appreciated.

I'm running a dedicated 4gb server for mysql alone.

my.cnf:
query_cache_type        = 1
query_cache_limit       = 1M
query_cache_size        = 128M

Open in new window


mysql output:
mysql> SHOW VARIABLES LIKE '%query_cache%';
+------------------------------+-----------+
| Variable_name                | Value     |
+------------------------------+-----------+
| have_query_cache             | YES       | 
| query_cache_limit            | 1048576   | 
| query_cache_min_res_unit     | 4096      | 
| query_cache_size             | 134217728 | 
| 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      | 21207    | 
| Qcache_free_memory      | 84123496 | 
| Qcache_hits             | 22579540 | 
| Qcache_inserts          | 10565072 | 
| Qcache_lowmem_prunes    | 0        | 
| Qcache_not_cached       | 842169   | 
| Qcache_queries_in_cache | 47005    | 
| Qcache_total_blocks     | 115267   | 
+-------------------------+----------+
8 rows in set (0.00 sec)

Open in new window



Thanks!
0
Comment
Question by:lpxtech
  • 2
2 Comments
 
LVL 6

Accepted Solution

by:
lpxtech earned 0 total points
ID: 34932408
This question was a mistake. Overlooked qcache output.
0
 
LVL 6

Author Closing Comment

by:lpxtech
ID: 34932410
This was a mistake. There's actually no problem.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Creating and Managing Databases with phpMyAdmin in cPanel.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question