in reply to Trouble with Benchmark
But the results are odd:
produces$sql = "SELECT COUNT(*) FROM theTable WHERE column = $value"; $iterations = 1000; $sth = $dbh->prepare($sql) or die("Could not prepare!" . $dbh->err +str); $exec_time = timethis($iterations, ' $sth->execute() or die("Could not execute!" . $dbh->errstr); $count = $sth->fetchrow_array( ); ');
timethis 1000: 26 wallclock secs ( 0.03 usr + 0.02 sys = 0.05 CPU) @ 20000.00/s (n=1000) (warning: too few iterations for a reliable count)
26 wallclock seconds but only 0.05 CPU seconds? And if I try to go to 5,000 iterations, the server returns an error.
|
|---|