Scott Gifford wrote:

SELECT COUNT(*) AS score FROM downloads WHERE dateline + 3600 >= UNIX_TIMESTAMP() GROUP BY filename ORDER BY score DESC

It would be better with

     WHERE dateline >= UNIX_TIMESTAMP() - 3600

so that it can use an index on dateline.

--
Keith Ivey <[EMAIL PROTECTED]>
Smokefree DC
http://www.smokefreedc.org
Washington, DC

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to