So, why better?
I think it is only a little bit slower, but making posts is itself a slow operation, so adding a couple of bits here doesn't really make sense.
On another hand, count()+update is more stable - what if admin deletes some users message at this time? What if there was some hang up in database, and you some of records were discounted?.. And, for example, I saw a board which lost part of its records during HDD crash. User posts were lost partially, but not re-calculated in database. In our case, recalculation takes time always. Additionally, you may program and advance this function easily, if you are making some operations based on user's posts amount (for example, are giving him points).
FIELD=FIELD+1 in most cases is more weak in this case. |