@aral @jan It is insanely bad query programming to have 3.5k IDs in WHERE clause 🤯 Considering table is properly indexed and vacuumed, I would split them into 100-200 microbatches and if each involves pinging a separate server of a follower account, even make those batches smaller. LIMIT and OFFSET should be the start from database side and then some task queueing from backend 🧐 #postgresql #sql #performance :postgresql: