I want to understand how those ranking sites work, like hackeews, reddit, etc. No matter how the ranking algorithm looks like, the elapsed time is necessary. So, do they scan the whole database to calculate the ranking for each item every second? that sounds terrible, there must be better way. After ranking score is calculated, when client retrieve the item list, is it just simply 'select * from item_list order by ranking desc' ? or there is some better faster way?
