Rewriting query with subquery to improve performance My query looks like that

SELECT topics.name, topics.topic_id, topics.creator, 
( SELECT COUNT(*) FROM answers 
WHERE answers.topic_id = topics.topic_id) 
AS replies FROM topics 
ORDER BY topics.bumped DESC, topics.date DESC LIMIT 500


However it takes 0.6s, I'm guessing that's because of the subquery that counts answers. Any other way to achieve this effect with better performance?
topics: INDEX(bumped, date) -- in that order
answers: INDEX(topic_id)


Please provide SHOW CREATE TABLE if you need to discuss this further.

500 is a lot of results -- more than a self-respecting UI should return.  What will you do with them?

Also Consider this approach:

SELECT  topics.name, topics.topic_id, topics.creator, replies.ct
    FROM  
    (
        SELECT  topic_id, count(1) AS ct
            FROM  answers 
            GROUP BY topic_id
    ) AS replies
    JOIN  topics  ON replies.topic_id = topics.topic_id
    ORDER BY  topics.bumped DESC, topics.date DESC
    LIMIT  500


It may run faster because of reaching into answers only once.

If, however, there could be zero replies in some cases, you need a LEFT JOIN:

SELECT  topics.name, topics.topic_id, topics.creator, replies.ct
    FROM  topics
    LEFT JOIN (
        SELECT  topic_id, count(1) AS ct
            FROM  answers 
            GROUP BY topic_id
              ) AS replies  ON replies.topic_id = topics.topic_id
    ORDER BY  topics.bumped DESC, topics.date DESC
    LIMIT  500


This does need a relatively new version of MySQL so that the derived table can automatically be given an index.

Which approach is fastest?  I can't tell; try them all.