SELECT distinct(p.pid), p.queued, t.approved, t.forum_id
FROM fgrposts p LEFT JOIN fgrtopics t on (t.tid=p.topic_id)
WHERE
t.forum_id IN (78,73,74,75,76,63,64,65,57,36,45,59,46,32,41,33,3 1,34,35,40,48,60,68,49,37,38,39,47,50,42,67,43,66)
AND p.queued=0 AND ( LOWER(p.post) LIKE '%girl%' )
there is explain for select:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t ALL PRIMARY,forum_id,last_post NULL NULL NULL 13668 Using where; Using temporary
1 SIMPLE p ref 5last,topic_id,queued 5last 4 gdv_ru.t.tid 24 Using where
|