There's more than one way to do things | |
PerlMonks |
Re: Need to Improve Performanceby moritz (Cardinal) |
on Jan 03, 2014 at 08:10 UTC ( [id://1069098]=note: print w/replies, xml ) | Need Help?? |
Since this doesn't depend on any data, there's no need to do it all over again in the loop. Do it once outside the loop. Also figure out a way to write a single SQL query that does everything you need (shouldn't be hard with a JOIN), so that you don't have to talk to the database so often.
In Section
Seekers of Perl Wisdom
|
|