Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL Query Cache isn't working.

Posted on 2011-02-19
2
Medium Priority
?
526 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

609 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