Stackoverflow celebrates 10 million questions. Congratulations!
Providing us with this link: https://stackoverflow.com/10m
3 counters are displayed, and the number of each counter increases quickly, not statically.
However, I do not see any AJAX requests to display the last result of each counter.
I also have a counter on our forum, but to get the number of recent posts, I make an AJAX request every 3 seconds, running the SELECT MAX(id) AS total_posts FROM forumposts to display.
I know this is not the best solution that we have, and it will be wrong if the message is deleted. Using the SELECT COUNT(id) command is too slow because we also have over 10 million messages.
So how does Stackoverflow show an increase in its counters without any queries? This seems to be the best solution for me, and I would like to use it for our forum, and then.
source share