WHERE timestamp LIKE '2008-05-06%' , this kind of thing always slow.
from table structure , i did not see you have index on timestamp.

also  "AND t.timestamp > DATE_SUB(NOW(), INTERVAL 7 day) " make mysql
scan whole table.
have you added "explain" to front of your query ?

 increase query buffer will increase speed too.



--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to