Optimize bridge_get_account_posts_by_replies by moving "ORDER BY ar.id DESC"...
Optimize bridge_get_account_posts_by_replies by moving "ORDER BY ar.id DESC" out of inner query so that optimizer doesn't think it should do a sequential scan of hive_posts (the LIMIT + ORDER BY seems to have led it astray). Previous code was too slow when the author didn't have any posts that could be replied to.
Loading
Please sign in to comment