N_F_S
08-09-2004, 02:14 AM
How can I find out the time taken for a query to execute, I tried to paste the query in mysql.exe but it's too long, anyone knows how to measure it??
thanks,
N_F_S
thanks,
N_F_S
![]() | View Full Version : Question for MySQL gurus N_F_S 08-09-2004, 02:14 AM How can I find out the time taken for a query to execute, I tried to paste the query in mysql.exe but it's too long, anyone knows how to measure it?? thanks, N_F_S JimPanse 08-09-2004, 03:51 AM So far i know, there is nothing to get the runtime of a query. Not by default. I use some code function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $_s = getmicrotime(); mysql_query(blah); //here goes your mysql-query $mysqlruntime = getmicrotime()-$_s; Toppi thartdyke 08-09-2004, 07:12 AM MySQL Control Center (from MySQL.com) will return the time taken. Don't know what the limits are on query length, but I'd imagine the limit you've seen is more to do with the command line buffer than a db limitation. Toby N_F_S 08-09-2004, 11:29 AM thartdyke, thanks , I forgot about what programmes can do, I have MySQL-Front and it tells me the time taken for a SQL query to execute. N_F_S |