Re: How to use Query Cache with Perl DBI
No, that's not true. The query cache will be used if you send MySQL a non-prepared statement that has already been executed, as Bill K. stated. For example, this code will make use of the query cache (as long as it is enabled):
$res= $dbh->selectall_arrayref("select * from testaa"); # 1st call, not cached
$res= $dbh->selectall_arrayref("select * from testaa"); # 2nd call, cached
If you are looking to avoid contacting the database server when you prepare a statement more than once, try using the DBI subroutine 'prepare_cached()'.
-Dave
Subject
Written By
Posted
September 01, 2006 10:20AM
September 01, 2006 10:56AM
September 01, 2006 11:11AM
September 01, 2006 08:38PM
September 02, 2006 11:25AM
September 02, 2006 10:02PM
Re: How to use Query Cache with Perl DBI
September 02, 2006 10:37PM
September 03, 2006 12:21AM
September 03, 2006 07:07AM
September 03, 2006 10:25AM
September 03, 2006 11:15AM
September 03, 2006 09:20PM
September 03, 2006 11:45AM
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.