Don't ask to ask, just ask | |
PerlMonks |
Re: which method is more faster?by archfool (Monk) |
on Jul 25, 2007 at 02:46 UTC ( [id://628614]=note: print w/replies, xml ) | Need Help?? |
Preparing a query that is used multiple times is almost ALWAYS faster and more efficient than ->do statements. The database has to parse and preprocess EVERY DO statement. Prepare gets the parsing and preprocessing done for you, and spends more time on work than overhead.
BTW... in a prepared statement, d='?' isn't needed. you should use d=? (Binding variables SHOULD quote it for you).
In Section
Seekers of Perl Wisdom
|
|