in reply to DBI: How to update 150K records efficiently
my $sth = $dbh->prepare('UPDATE myTable SET va = ?, vb = ? WHERE vc = +?'); while (my $record = <$input>){ my @values = (split(/\|/,$record))[1,3,5]; $sth->execute(@values); } $sth->finish()
At least it avoids generating hashes for everything, and it uses a cached "prepared statement".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: DBI: How to update 150K records efficiently
by Juerd (Abbot) on Mar 31, 2008 at 15:16 UTC |