in reply to Slow script: DBI, MySQL, or just too much data?
A better reference for how to speed up DBI commands can be found here: http://www.perlmonks.org/bare/?node_id=273952 Good luck!my $max_rows_commit = 0; my $store = $dbh->prepare('INSERT ... '); foreach my $row (@rows){ $store->execute($row); $max_rows_commit++; if ($max_rows_commit >10000){ $dbh->commit; $max_rows_commit = 0; } } $dbh->commit;
|
|---|