EXPLAIN SELECT COUNT( * ) FROM boardposts t1 INNER JOIN boardposts t2 ON ( t2.topic =766 AND t2.replyTo =47069 ) WHERE t1.topic =766 AND ( t1.replyTo = t2.id OR t1.id = t2.id ) ORDER BY t1.addDate LIMIT 0 , 20 [code]id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref id_2,byTopic,byReplyTo byTopic 4 const 12943 Using where; Using filesort 1 SIMPLE t2 ref id_2,byTopic,byReplyTo byReplyTo 4 const 7185 Using where 1 SIMPLE t1 ref id_2,byTopic,byReplyTo byTopic 4 const 12943 Using where 1 SIMPLE t2 ref id_2,byTopic,byReplyTo byReplyTo 4 const 7185 Using where[/code] The first 2 are the data query, and the second 2 are the count query topic = id of the topic replyTo = id of the post that post is a reply to