If you want to be truly lazy, simply replace prepare by prepare_cached, and DBI itself will check if it has ever seen the query before, and will return an appropriate context for your statement handler (which in turn should hit a query plan cached by the DB backend).
• another intruder with the mooring in the heart of the Perl
In reply to Re^3: Perl Code Efficiency Issue
by grinder
in thread Perl Code Efficiency Issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |