I am wondering what is best for having redundant columns in a MySQL database. I am interested in this because I have a User table in my database, but I also want to be able to display a lot of statistics about each individual user. These statistics may include how many times a user interacted with another model or how many messages they have.
Does performance deteriorate the search for all records of a certain object (for example, messages) to count them? Or is it better to make a redundant column in a user table called total_messages, which is updated every time a message is added / deleted? Thank you, it confused me a little.
source
share