Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #16985 When running query, not getting cached results
Submitted: 2010-01-11 15:25 UTC
From: joeman Assigned:
Status: Feedback Package: MDB2 (version 2.4.1)
PHP Version: 5.2.4 OS: Debian Linux (Lenny)
Roadmaps: (Not assigned)    
Subscription  


 [2010-01-11 15:25 UTC] joeman (Joseph Turner)
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.

Comments

 [2012-10-24 20:37 UTC] danielc (Daniel Convissor)
-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.