Perl: the Markov chain saw | |
PerlMonks |
Re: Safety of concatenating query stringby {}think (Sexton) |
on Jun 24, 2011 at 10:16 UTC ( [id://911221]=note: print w/replies, xml ) | Need Help?? |
One VERY MINOR point is that with the placeholder version, your database sees both sort-column statements as being the same statement (ending in ORDER by ?) as opposed to two statements with differing ORDER clauses. One single statement means one single prepare / execution plan, and thus saves time. I must confess, I use BOTH techniques as I see convenient.
{}think; #Think outside of the brackets
In Section
Seekers of Perl Wisdom
|
|