I add a point system to my application, where for every action that the user takes (registration, voting, comment, etc.), they get award points. Since this is a fairly common feature, I wanted to get an idea of how others implemented their points system.
More specifically, when tracking points, regardless of whether you make new inserts in the point table, and then simply do the SUM when you need the total, or if you update one record for each user. What key factors will affect a decision in one way over another, and what are the trade-offs?
Intuitively, since inserts are usually cheaper than updates, I would think that inserts are a way of assuming that the average number of points per user is not too large. However, I am not a db specialist, so I would like to get your thoughts.
source share