in reply to DBI Performance help

For timings set the "Profile" on each db handle:
$dbh->{Profile} = 6;
Change:
while ( @columns = $sth1->fetchrow_array ) { $inserted += $sth2->execute(@columns); ... } }
to:
while ($row=shift(@$cache) || shift@{$cache=$sth_o->fetchall_arrayref( +undef,$max_rows) || []}) { $inserted += $sth2->execute(@$row); ... };
NB: Bunce says that optimal value for $max_row depends on the number and size of columns returned.