>>>>> "Jules" == Jules Bean <jmlb2@stripped> writes:
Jules> Joshua Chamas wrote:
>> Jules Bean wrote:
>> > *blink*
>> > I didn't think you could prepare *any* queries with mysql. I thought
>> > that DBI::prepare was basically a no-op when using the Mysql driver
>> > (well, not quite - it stores the string locally, and does the ?
>> Oops... because I couldn't get the DBD::mysql driver to compile
>> for my perl on WinNT, I have been using DBD::ODBC through MyODBC,
>> so the 30+% prepare_cache'ing speedup that I am seeing might
>> be ODBC related, not DBD::mysql. If this is the case that its
>> an ODBC thing, surely DBD::mysql would be able to take advantage
>> of the same caching that ODBC could if coded the right way ?!
Jules> That could well be it. I could believe that ODBC does some internal
Jules> query pre-compiling.
The time difference may be that when you prepare the query there will
be fewer call through the ODBC manager and this will speed up some
things. Another issue is that MyODBC only have to parse the query
once to check for parameters when you use prepared statements.
If you connect directly to MySQL, the time differences should be much smaller