Wondering what's better for, for example, forum systems:
to either have a
- counter field of amount of posts of a specific forum/thread inside the database => use mysql query to select that single field that indicated the amount of posts inside the specific forum or thread
- not have a counter field but use mysql queries to realtime track the amount of posts inside a specific forum or thread ( selecting/counting multiple rows, all rows, for calculating the amount of posts inside the thread at that moment, live )
My doubts are because I see pros and cons for both options: first option is faster, and only uses one query to select all fields values, while the 2nd option needs to calculate it by executing multiple queries ( for amount of posts, replies, etc. ) but however is realtime results and doesn't need update queries for updating counters.


Sign In
Create Account


Back to top









