Log in

View Full Version : What would be causing this query?


yellowchaser
05-12-2005, 06:44 AM
What would be causing this query? It seems to run every so often and practically takes down my whole server because it bogs everything down.

mysql -p -e "explain SELECT COUNT(*) AS count FROM post WHERE
dateline >= '1115866077'" vbforums

which produces 500,000 rows. It seems to run every now and again, and
causes MySQL to sit hammering the disk for a while (right now it has
been running for over 3 minutes).

Marco van Herwaarden
05-12-2005, 07:39 AM
This query is used to count the number of new posts since last visit. This query could never produce more then 1 row. It is called everytime someone goes to your index.php file.