Hello, I was wondering if there was a better way to speed up my update statement in my perl script. It goes through all the entries in the database , which is around 800, 000, and then updates the email field. The problem is that it takes to long. thanks in advance for any help
here the code: open(A, "$ktjpath/$ktjlist") || &death("Can't open $ktjlist: um121"); my $sql_statement = "UPDATE ktj SET ktjnews = 'N' WHERE email = ?"; my $sth = $dbh->prepare($sql_statement) || die "Error1 preparing update statement on track:\n" . $dbh->errstr; while (<A>){ print "$_\n"; $sth->execute($_) || die "Error2 executing update statement on track:\n" . $sth->errstr; } close A; --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php