Re: MDB2 query caching
| From: | Sami Mußbach | Date: | Mon, 12 Jan 2009 07:21:34 +0000 |
| Subject: | Re: MDB2 query caching | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29584@lists.php.net to get a copy of this message | ||
Hi,
thank you for your replay and for the link. (and sorry to bother you again...).
I understood that the query sould be cached and I understand why. But if I test it I receive a different result.
If I ask mysql with SHOW STATUS LIKE 'Qcache%' I receive Qcache_not_cached 0. If I perform one simple prepared select-query , I receive Qcache_not_cached 2, but I would expect it to be one as it increments automatically. In addition, I have Qcache_inserts, Qcache_hits and Qcache_queries_in_cache all 0. Cache is activated and works perfectly with mysql_query()-querys.
Do I interpret this correctly as the cache is somehow not used? Any Ideas?
Thank you!
Cheers
Sami
Am 10.01.2009 um 06:08 schrieb Daniel O'Connor:
On Fri, Jan 9, 2009 at 7:44 PM, Sami Mußbach <mussbach@leuphana.de> wrote:H, I have heard, that if you use prepared statements for SELECT-Querys with MDB2 at a mysql-database, that the mysql cache is not used.That doesn't sound right - unless your query has SELECT SQL_NO_CACHE * FROM foo in it; Or its a query that mysql hasn't seen before; or mysql query caching is turned off; it should always be hitting it. Perhaps have a read of http://dev.mysql.com/doc/refman/5.1/en/query-cache-status-and-maintenance.htmland see if that can help you debug your problem further