DEV Community

Discussion on: Database 101: How social media “likes” are stored in a database

Collapse
 
quin profile image
quin

I wonder if it would be even better to only do that every... 30 or so likes. So basically, make a condition where if the count is divisible by 30, recalculate and overwrite the count. Best of both worlds? Or is the condition too expensive itself? At least it doesn't involve reading another table.