Bug #1831 Queries are not cached
Submitted: 13 Nov 2003 15:24 Modified: 13 Dec 2003 15:58
Reporter: Moshe Itah Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.12 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[13 Nov 2003 15:24] Moshe Itah
Description:
I turned on Query cache (using query_cache_size=4M). From "show status" I can tel that some queries are cached, but most are not.  All my queries are supposed to be cached as they are simple: "SELECT * FROM some_table WHERE (ID='some-key')" and do not innclude any of the functions mentioned in the manual.  Here is  sample of "SHOW STATUS".

mysql> show status like 'qcach%';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| Qcache_queries_in_cache | 554     |
| Qcache_inserts          | 564     |
| Qcache_hits             | 130     |
| Qcache_lowmem_prunes    | 0       |
| Qcache_not_cached       | 5024    |
| Qcache_free_memory      | 3055880 |
| Qcache_free_blocks      | 1       |
| Qcache_total_blocks     | 1157    |
+-------------------------+---------+
8 rows in set (0.00 sec)

How to repeat:
To create that case above, I ran my java-based application that sends a few thousand of SQL queries to the server.
[13 Nov 2003 15:58] Dean Ellis
Consider testing again using the latest release of MySQL 4.0.

Taking into account everything the manual has to say about how the query cache works and what it does not query ( http://www.mysql.com/doc/en/Query_Cache_How.html ), you would need to provide some samples of queries that it is definitely not caching which you feel it should in fact cache.

Thank you
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".