Not sure if this is a correct forum, or if any forum is appropriate on this site
So if anyone knows a better site where I can get some answers let me know.
Ok so I have a query that
$get = mysql_query("Select * from user WHERE online>$check order by posts DESC limit $offset, $limit");
This is how it is basically...
then I have a
while ($table = mysql_fetch_array($get))
displays user information of those that have been active in the past 10 mins, seperated by pages...
So how would I index this? I've read about indexing and it is easy to index things like id and stuff, but online field is just time() that is updated every time a user triggers it
Is it possible to make a index based upon *time()-600*? Where it basically seperates users from online users, and when I do order by posts which isn't indexed is that going to make the query even worse?
Right now the amount of users I have is 30k and will climb to 3,000,000 at the end of the month. So I really need to do something to optimize this page or else it is destined to have problems...