in reply to Optimizing Loop

You better start by timing where the bottlenecks are, we can't tell from a distance how your system performs.

some ideas:

> to do what the following code does.

documenting / explaining what it "does" might facilitate getting help ...

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: Optimizing Loop
by Anonymous Monk on Feb 18, 2014 at 10:34 UTC
    The last two points are really important. The final point doubly so. (But you need to learn basic SQL for that.)

    (I'll also add that bound columns are even more efficient than arrays: $sth->bind_columns(\$col1, \$col2, \$col3); while ($sth->fetch) { print "$col1\n" })