What's a good database schema for "Top comments in last 24 hours"
russell: I would add a time stamp for the last update and a total column.  Update the total and timestamp every time you update a bucket. Zero any buckets between the saved timestamp and now. To get your list select comments updated in the last 24 hours and ordered by total.  You will have some rows with artificially high counts, because of numbers older than 24 hours.  Adjust the totals for the row and keep reading until you have the number you need.  If you cache the list, you dont even need to do the select except on restart.  Email me if you want clarification.