in reply to DBI Performance help

Please use <code></code> tags around your code.

Using fetchrow_arrayref instead of fetchrow_array might be slightly faster, or using bind_columns, but probably not by much. E.g.:

my $sth = $dbh->prepare("SELECT ..."); my @columns = @{$sth->{NAME}}; my @row; $sth->bind_columns(\@row{0..$#columns}); # Then while ($sth->fetch()) { $ins_h->execute(@columns); }
But, it would probably be significantly faster if you could use whatever bulk-load facility your database provides.

Replies are listed 'Best First'.
Re^2: DBI Performance help
by Tux (Canon) on Oct 09, 2010 at 11:51 UTC

    Not slightly, it matters a lot. Bench if you want to know.

    See here for a postgresql example


    Enjoy, Have FUN! H.Merijn