I am looking for the solution to check mysql execution time of query after code runs.
Is there any way to achieve this ? I have done in PHPMYADMIN , its showing whole log, but how it will be achieved when i am working with project ?
I am looking for the solution to check mysql execution time of query after code runs.
Is there any way to achieve this ? I have done in PHPMYADMIN , its showing whole log, but how it will be achieved when i am working with project ?
try this code to get a execution time of sql query
$sql = '...';
$msc = microtime(true);
mysql_query($sql);
$msc = microtime(true)-$msc;
echo $msc . ' s'; // in seconds
echo ($msc * 1000) . ' ms'; // in millseconds
Hope this one worked for you.