Today we will learn a few interesting things about SQL Query Optimization.
How to get query execution time and executed query number?
Follow the code given below:
function timer()
{
$time = explode(‘ ‘, microtime());
return $time[0]+$time[1];
}
$beginning = timer();
$timer_queries += round(timer()-$beginning,6);
The sql query becomes faster if you use the actual columns names in SELECT statement instead of than ‘*’.
For Example: Write [...]
