healthy ratio of Qcache_hits to Qcache_inserts?
I've just reworked some of my SQL queries to hopefully improve query cacheing... mainly I've removed alot of variability in a set of queries so that they should be only a small number of unique SQL SELECT statements spread across many thousands of queries.
Here are some preliminary results I'm seeing:
mysql> show status like 'Com_sel%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_select | 27659 |
+---------------+-------+
1 row in set (0.00 sec)
mysql> show status like '%cache%';
+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Qcache_free_blocks | 53 |
| Qcache_free_memory | 66949568 |
| Qcache_hits | 22471 |
| Qcache_inserts | 21450 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 6249 |
| Qcache_queries_in_cache | 54 |
| Qcache_total_blocks | 175 |
| Threads_cached | 1 |
+-------------------------+----------+
So, it seems that I have a high "Qcache_hits" to "Com_select" ratio... but what I don't understand is the "Qcache_inserts" variable. The ratio of Qcache_hits to Qcache_inserts is only slightly more than 1. Is this healthy? Should it be the case that if a SELECT is served from the cache, then there's no cache-insert?
Could someone clarify what Qcache_insert means? Is it that the result of a SELECT was actually put in the cache? And a cache insert doesn't happen for a query that was served from the cache in the first place? (a Qcache_hit).
thanks for any clarification.
JB
Subject
Views
Written By
Posted
healthy ratio of Qcache_hits to Qcache_inserts?
11045
November 17, 2005 01:43AM
4349
November 17, 2005 03:00AM
3451
November 17, 2005 09:14AM
3307
November 17, 2005 10:37AM
3178
November 17, 2005 11:09AM
3217
November 17, 2005 03:51PM
2864
November 17, 2005 05:20PM
2601
November 17, 2005 07:22PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.