MySQL Forums
Forum List  »  Perl

Re: How to use Query Cache with Perl DBI
Posted by: howa chen
Date: September 03, 2006 09:20PM

some experiment results:

without `mysql_server_prepare` in the connect statement:

1. do(), no placeholder -> cached
2. prepare() & execute(), no placeholder -> cached
3. prepare() & execute(), with placeholder -> cached



with `mysql_server_prepare` in the connect statement:

1. do(), no placeholder -> cached
2. prepare() & execute(), no placeholder -> not cached
3. prepare() & execute(), with placeholder -> not cached


quite confusing as:

1. DBI documentations never told us to use `mysql_server_prepare`, so they assumed prepare() will be done on the driver level, not server side
http://search.cpan.org/~timb/DBI/DBI.pm

2. i suspect if it is really useful to do prepare at the driver level, since the SQL statements are not being parsed and compiled at the server side at all, if we really want to take the advantage of parsing, we should use `mysql_server_prepare`

Options: ReplyQuote


Subject
Written By
Posted
September 01, 2006 10:20AM
Re: How to use Query Cache with Perl DBI
September 03, 2006 09:20PM


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.