Slow JOIN operations are typically caused by missing indexes. Analyze the slow query with EXPLAIN to identify the problematic part:
EXPLAIN SELECT qa_posts.postid, qa_posts.categoryid, ...