While investigating the load on s8 databases (T246415: Investigate a different db load groups for wikidata / wikibase), one of the queries with the highest "total latency" on master came up this:
UPDATE user SET user_editcount = user_editcount + ? WHERE user_id = ? AND ( user_editcount IS NOT NULL )
Which in total is responsible for 6% of all latency on master of s8 (for comparison, updating term store is only 3%).
This definitely can be improved. We can maybe push it jobs and deduplicate it (somehow without losing the value) given that that in some wikis, bots edit at really high rate (sometimes a bot edits up to 500 edits per minute) making lots of locking happening at the same on their row in user table. We can also go at the direction of site_stats and have it in WAN that flushes it from time to time.