Slow query while using DISTINCT in MYSQL with various other conditions (10 million records)
IN ( long list ) often performs badly. Try rewriting using [NOT] EXISTS or [LEFT] JOIN. Example:

SELECT DISTINCT activities.post_id 
FROM activities 
JOIN &lt;table with followed_user_ids&gt;
   ON activities.user_id = ...    
JOIN user_languages
   ON activities.user_id = ...
LEFT JOIN &lt;table with blocked users&gt; bu
   ON activities.user_id = ...
WHERE bu.&lt;attribute&gt; IS NULL -- no match
ORDER BY activities.id DESC 
LIMIT 1 OFFSET 10;


Make sure you have appropriate indexes on JOIN predicates.