Bug #16985 [Opn->Fbk]: When running query, not getting cached results
| From: | danielc at analysisandsolutions dot com | Date: | Wed, 24 Oct 2012 15:37:43 +0000 |
| Subject: | Bug #16985 [Opn->Fbk]: When running query, not getting cached results | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9222@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=16985&edit=1
ID: 16985
Updated by: danielc@analysisandsolutions.com
Reported By: joeman at litech dot com dot au
Summary: When running query, not getting cached results
-Status: Open
+Status: Feedback
Type: Bug
Package: MDB2
Operating System: Debian Linux (Lenny)
Package Version: 2.4.1
PHP Version: 5.2.4
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
Is this still a problem? If so, we'll need you to track down where in
MDB2 the issue is being caused.
Previous Comments:
------------------------------------------------------------------------
[2010-01-11 10:25:14] joeman
Description:
------------
I ran a query in mysql and it takes 8 seconds to execute. When I run it
a second time, it takes close to zero seconds, because the results are
cached. If I exit mysql and go back in and execute it, it still runs
very quickly.
I wrote a small php script to execute the exact same query using mdb2. I
used mysql profiler and determined that no matter how many times I run
this query, it always takes about 8 seconds. i.e. it doesn't retrieve
results of the cache.
I re-wrote the PHP script to use mysql_query and this did use the cached
resultset.
I ran mysql profiler and this indicated that with MDB2 it did try and
see if the SQL was in cache, but it didn't take notice of it.
Test script:
---------------
http://leederville.net/~joeman/mdb2_caching_issue.tar.gz
test.php uses mysql_query
testmdb2.php uses mdb2
mysql_query_results.txt - results for test.php script
mdb2_query_results.txt - results for testmdb2.php script
Expected result:
----------------
Both to have the SAME profiles. But they don't.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=16985&edit=1