Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
}
print "\nInserting records...\n";
$i=0;
+
+my $commitnum = 100;
+$dbh->{AutoCommit} = 0;
+
$sth = $dbh->prepare("INSERT INTO nozebra (server,indexname,value,biblionumbers) VALUES ('biblioserver',?,?,?)");
foreach my $key (keys %result) {
foreach my $index (keys %{$result{$key}}) {
print "\r$i";
$i++;
$sth->execute($key,$index,$result{$key}->{$index});
+ $dbh->commit() if (0 == $i % $commitnum);
}
}
print "\nbiblios done\n";