18 Jan
2011
18 Jan
'11
2:41 p.m.
Make sure that you are preparing the statement outside of the while loop so instead of
# Pick up the sql line from the stdinput while( my $line = <FILE> ) {
$sth = $dbh->prepare( $line ); $dbh->execute( $line );
}
It should look like $sth = $dbh->prepare('insert into table....'); while( my $line = <FILE> ) { $dbh->execute( $line ); } That saves a lot of CPU cycles.