Please check below query its making server slow
How can resolve it ?
SELECT qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type, 1) AS basetype, INSTR(qa_posts.type, '_HIDDEN')>0 AS hidden, qa_posts.acount, qa_posts.selchildid, qa_posts.closedbyid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, qa_posts.title, qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created) AS created, qa_posts.name, qa_categories.title AS categoryname, qa_categories.backpath AS categorybackpath, CONCAT_WS(',', qa_posts.catidpath1, qa_posts.catidpath2, qa_posts.catidpath3, qa_posts.categoryid) AS categoryids, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip) AS createip, qa_userpoints.points, qa_users.flags, qa_users.level, qa_users.email AS email, qa_users.handle AS handle, BINARY qa_users.avatarblobid AS avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, score FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN (SELECT postid, SUM(score)+LOG(postid)/1000000 AS score FROM ((SELECT qa_titlewords.postid, LOG(10000/titlecount) AS score FROM qa_titlewords JOIN qa_words ON qa_titlewords.wordid=qa_words.wordid JOIN qa_titlewords AS source ON qa_titlewords.wordid=source.wordid WHERE source.postid=226094 AND titlecount<10000) UNION ALL (SELECT qa_posttags.postid, 2*LOG(10000/tagcount) AS score FROM qa_posttags JOIN qa_words ON qa_posttags.wordid=qa_words.wordid JOIN qa_posttags AS source ON qa_posttags.wordid=source.wordid WHERE source.postid=226094 AND tagcount<10000) UNION ALL (SELECT qa_posts.postid, LOG(10000/qa_categories.qcount) FROM qa_posts JOIN qa_categories ON qa_posts.categoryid=qa_categories.categoryid AND qa_posts.type='Q' WHERE qa_categories.categoryid=(SELECT categoryid FROM qa_posts WHERE postid=226094) AND qa_categories.qcount<10000)) x WHERE postid!=226094 GROUP BY postid ORDER BY score DESC LIMIT