The Student Room Group

Self-teaching SQL and other programming languages

Scroll to see replies

Reply 20
Original post by jenhasdreams
Her reply :wink:

Yes we store the number of posts against each user in the user table, which is updated whenever a post is made. It would be very slow to calculate the number of posts for a member every time that member profiles is loaded, as there are over 5 million posts.


Fair enough, good point. Though I still think it all depends on the situation though. In some other situations, it would be easier and better to count the number of records, and in some situations it would be easier and better to store it separately.

Well, that's something new I learnt today. :smile:

Quick Reply

Latest

Trending

Trending