Hi,
I am wondering what is the peformance gain for using counter_cache?
Simple counter_cache setup:
class Comment
belongs_to :post, :counter_cache => true
end
class Post
has_many :commments
end
So, the ‘post’ table will have a column called ‘comments_count’.
I’m trying to see if using counter_cache is worth it given the extra
table or even column and extra inserts.
Thanks.
Truong-An.