MySQL:Copying to tmp table

Hai.,

I have faced server Hanging becase of the following.
Please check the below image

SELECT a.id as articleID, a.name as articleName, IF(s.id, 2, 0) + – Similar article IF(s2.id, 1, 0) – Same category as relevance FROM s_articles a INNERJOIN s_articles_categories_ro ac ON ac.articleID=a.id AND ac.categoryID = 3 INNERJOIN s_categories c ON c.id = ac.categoryID AND c.active = 1 LEFT JOINs_articles_avoid_customergroups ag ON ag.articleID=a.id AND ag.customergroupID=1LEFT JOIN s_articles o ON o.id=3076 LEFT JOIN s_articles_similar s ONs.articleID=o.id AND s.relatedarticle=a.id LEFT JOIN s_articles_categories_ro s1ON s1.articleID=o.id LEFT JOIN s_articles_categories_ro s2 ONs2.categoryID=s1.categoryID AND s2.articleID=a.id WHERE a.active = 1 ANDag.articleID IS NULL AND a.id!=3076 GROUP BY a.id ORDER BY relevance DESC LIMIT 4

The above select Query run many more time in PhpMyAdmin.

Please help me in this

Thanks in Advance