Ask PG: How often are the ratings for HN submissions crunched
I was just curious how it's implemented.
I know the formula is:
(p - 1) / (t + 2)^1.5
where p and t are:
p = votes (points) from users. t = time since submission in hours.
So to reduce the load on the server, is the calculation done every X number of minutes? Then when you query for the stories, do you just sort by rating desc?