I'm building a website using php/mysql where there will be Posts and Comments.
Posts need to show number of comments they have. I have count_comments
column in Posts table and update it every time comment is created or deleted.
Someone recently advised me that denormalazing this way is a bad idea and I should be using caching instead.