i am running the below MySQL Query in PHP on my web server, the database is located on a separate server:
$sql="select * from call_history where extension_number = '0536*500' and flow = 'in' and DATE(initiated) = '".date("Y-m-d")."' ";
$rs=mysql_query($sql,$pbx01_conn);
echo mysql_num_rows($rs).' Calls IN';
the call_history
table has thousands of rows in, is there any way to speed up the query?
Please note: I only have read only access to the database