1👍
✅
This is not a question about Django, but a question about databases. StackOverflow isn’t really the place to go into the ins and outs of database indexes, but you should at least be aware that this is exactly the sort of thing that databases are good at. Just updating a single row of a table is nothing, and even if you’ve defined an index on the num_likes
column it’ll be updated extremely quickly unless you have millions of records.
Source:stackexchange.com