$sql = "appropriate select statement"; $sth = $dbh->prepare($sql) or die("Could not prepare!" . $dbh->errstr); $start_2 = new Benchmark; for $i (0 .. $iterations) { $sth->execute() or die("Could not execute 1!" . $dbh->errstr); } $count = $sth->fetchrow_array(); $end_2 = new Benchmark; $diff_2 = timediff($end_2, $start_2);