in reply to Perl Code Efficiency Issue
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Code Efficiency Issue
by Anonymous Monk on Feb 15, 2008 at 15:57 UTC | |
by cdarke (Prior) on Feb 15, 2008 at 16:04 UTC | |
by Jenda (Abbot) on Feb 15, 2008 at 17:58 UTC | |
by Anonymous Monk on Feb 15, 2008 at 16:18 UTC | |
by grinder (Bishop) on Feb 15, 2008 at 17:21 UTC |