I have a huge forum and I'm trying to run the below query and it's bogging things down pretty horribly. I'm assuming knowing how bad I am when it comes to table joins that there has to be a better way to do this to not raise the load on the server, so any help is appreciated.
Code:
SELECT xf_thread.thread_id, xf_user.avatar_date, xf_post.user_id, xf_post.post_id, xf_post.username, xf_thread.title, xf_thread.node_id FROM xf_post LEFT JOIN xf_thread ON xf_thread.thread_id=xf_post.thread_id LEFT JOIN xf_user ON xf_post.user_id=xf_user.user_id WHERE xf_thread.node_id = '10' ORDER BY xf_post.post_id DESC LIMIT 0,1"