Re: DBD::mysql and mysql_use_result
Patrick Galbraith <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl,gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
On Aug 9, 2004, at 8:01 PM, Rudy Lippan wrote: > On Sat, 7 Aug 2004, Patrick Galbraith wrote: > >> 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. >> > > I plan, if possible, to make "use result" the default with prepared > statements, > my thinking here is this: if you are going to be using parepared > statements, you > will more than likly be running in a persistant envionment, in which > case, > memory usage becomes more of an issue. esp. in something like a > mod_perl > envionment because when you use "store result" you will more than > likely use 2x > the memory (or more) -- Think of an application that munges the result > result > set and pases the munged data off to a templating system for a total > of three > times memory usage of just the result set. > Rudy, Hmm... I can see that point. Is there something similar to this in other database drivers? What setting do they default to? I would like to bring this up too with the fellow who implemented the server prepare statements in the server and see what he thinks. > And from my reading of the docs (though I have not had a chance to > test this > yet), mysql_stmt_store_result() need not be called mysql_stmt_fetch(). > Is this > the case? > Yes, an I just tested this with the latest code I've worked on, and it works without store_result. I'm curious to see what my benchmarking will show ;) As far as the question about use_result, I'll have to test this. regards, Patrick > > Rudy > > > -- > MySQL Perl Mailing List > For list archives: http://lists.mysql.com/perl > To unsubscribe: http://lists.mysql.com/[email protected] > Patrick Galbraith Senior Software Developer [email protected] http://www.mysql.com "Whatever action a great man performs, common men follow. Whatever standards he sets by exemplary acts, all the world pursues" -- Bhagavad Gita -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]