I was wondering how best to implement the “ most viewed ” (like youtube) in my database.
Let me explain that the most viewed feature has improved a bit: Basically I want to list the most visited pages / videos / etc from this day / week / month, see
http://www.youtube.com/charts/videos_views for an example.
So, I was wondering how to best implement this function, since I can come up with many different ways to do this, but everyone has their own + and - for them.
Plus, I would also like to hear the comments of various programmers about other ideas of programmers. I would also like to start a good conversation on this topic.
Ps. I especially think about how to calculate the time, say, the most viewed this month, without a huge table that saves each view using datetime. Any idea is welcome.
Pps I use Mysql and PHP, additional tips for these two are very welcome.
source
share