Hi, is there any way to get the time a query takes?
Do I have to do this with php - or is there a function in mysql that can messure the time?
Hi,
from the manual: http://www.php.net/manual/en/function.microtime.php
function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $time_start = getmicrotime(); //Function to krono $time_end = getmicrotime(); $time = $time_end - $time_start; echo "Did nothing in $time seconds";
but don't work on all server.
See you