i have a big data record from onlines table. (more than 40 Million record)
now i want to show online user in any time from the table but this execute from server has been failed ...
for example when i send request get online in last week , it's dose not work (because the table have very large record).
this is my example php code:
$d = $_GET['date'];
$time = time() - 60*60 * 24 * $d;
$phql = "SELECT DISTINCT aid FROM onlines WHERE time > '$time'";
so, do you have any better tips ?
Tnx.