For a discussions forum, I need to show a page of most viewed discussions.

For implementing this, I maintain a count of views of a discussion & when this views count of a discussion passes a certain threshold limit, the discussion Id is added to a row of most viewed discussions.

This row of most viewed discussions contains columns with Integer names & values containing serialized lists of Ids of all discussions whose views count equals the Integral name of this column.

Thus if the view count of a discussion increases I'll need to move its 'Id' from serialized list in some column to serialized list in another column whose name represents the updated views count on that discussion.

Thus I can get the most viewed discussions by getting the appropriate no of columns from one end of this Integer sorted row.


I wanted to get feedback from you all, to know if this is a good design.