Re: DBD::mysql and mysql_use_result
Alan Burlison <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl,gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
Patrick Galbraith wrote: > It's not public yet, and therefore not documented as such, but > mysql_server_prepare enables the server to prepare the statement as > opposed to emulating the prepare in the driver. Prior to mysql 4.1, > there was no support for server prepare statements, so it was up to the > driver to parse placeholders and then substitute values upon execution. > The current DBD::mysql that is public does this. With the latest > changes, the server will prepare the statement. This can bring some > performance increase, especially if you are dealing with a lot of inserts. I am, and lots of updates as well. > As far as use_result vs. store result, the server prepared statements > (mysql 4.1 and greater) will always use 'store result', as this has no > affect on performance as per the API documentation. Umm, I thought store_result meant that the data was transferred over to the client in one big wodge? In my case that constitutes nearly 100Mb of memory, which most certainly *does* have an effect on performance, so I can't see how server prepared statements are going to help - and I also don't understand how server prepared statements mandates the use of store_result... -- Alan Burlison -- -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]