One thing that jumps out at me is that you're constantly re-prepare-ing your UPDATE statement inside the last while loop. You should prepare it once outside the loop with placeholders (instead of interpolating into the string; in fact you should do that with your other statements as well), then just call execute with the values you've extracted out.
Another performance hit might be that you're using fetchrow_hashref; I want to say using this rather than (say) fetchrow_arrayref incurs a higher overhead (since it's got to parse and populate a hashref rather than just returning a set of values).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Perl Code Efficiency Issue
by Fletch
in thread Perl Code Efficiency Issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |