Im having a strange problem here. When im reading from my db in my perl script, everything goes fine. However when I write to the db, the perl script goes from 1% CPU load to 60% CPU load, and stays there. This happens every now and then so not every time when writing to the db. What could cause this?
Code:
my $dbh = DBI->connect("DBI:mysql:xxxxx:localhost","root","xxxxx");
my $sth = $dbh->prepare("INSERT INTO contacts VALUES ('','$email','$username')");
$sth->execute();
$dbh->disconnect();