List:MySQL and Perl« Previous MessageNext Message »
From:Alan Burlison Date:August 9 2004 8:30am
Subject:Re: DBD::mysql and mysql_use_result
View as plain text  
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
--
Thread
DBD::mysql and mysql_use_resultAlan Burlison6 Aug
  • Re: DBD::mysql and mysql_use_resultJochen Wiedmann6 Aug
    • Re: DBD::mysql and mysql_use_resultPatrick Galbraith9 Aug
  • Re: DBD::mysql and mysql_use_resultRudy Lippan6 Aug
  • Re: DBD::mysql and mysql_use_resultTim Bunce6 Aug
Re: DBD::mysql and mysql_use_resultAlan Burlison6 Aug
  • Re: DBD::mysql and mysql_use_resultPatrick Galbraith9 Aug
    • Re: DBD::mysql and mysql_use_resultRudy Lippan10 Aug
      • Re: DBD::mysql and mysql_use_resultTim Bunce12 Aug
        • Re: DBD::mysql and mysql_use_resultAlan Burlison14 Aug
          • Re: DBD::mysql and mysql_use_resultTim Bunce17 Aug
      • Re: DBD::mysql and mysql_use_resultPatrick Galbraith18 Aug
Re: DBD::mysql and mysql_use_resultTim Bunce7 Aug
  • Re: DBD::mysql and mysql_use_resultPatrick Galbraith9 Aug
Re: DBD::mysql and mysql_use_resultAlan Burlison9 Aug