2 ms·
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 sa
by russell 18y ago
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.