-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 March 2004 08:58, Jonas Lindén wrote:
> Hello list, I am trying to find a way to retrive the time a certain
> select statement took for debug purposes. If I execute a select
> statement in the mysql console I get the time that select statement
> took to execute. I am searching for a way to retrive that value.
> Right now I am using the perl:dbi to connect to my mysql db. Has
> anyone managed to do this?

I'm not sure whether you can retrieve the query time from the server, 
but you could always time it your end using the Benchmark module.

For an example:

use Benchmark;

#.. set up DB connection etc ...

$time0 = new Benchmark;
# do the query
$time1 = new Benchmark;
print "Done in " . timestr(timediff($time1,$time0));


You could also investigate the Time::HiRes module to do an accurate time 
yourself.

Cheers

David P


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFARvUqrz7S5k65yyYRAm0JAKDHSh/pYQoH7IUdA4dbw1RurOwy8ACgsqSs
8avkvE/DXPwSmRa8O678xuw=
=iCji
-----END PGP SIGNATURE-----

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to