Index for slow query:

SELECT
                        p.*,
                        s.id as s_id,
                        m.id, m.name, m.mgroup, m.email, m.joined,
                        m.gender,
                        m.avatar, m.avatar_size, m.posts, m.aim_name,
                        m.icq_number, m.signature,  m.website, m.yahoo,
                        m.integ_msg, m.title, m.hide_email, m.msnname,
                        m.warn_level, m.warn_lastwarn,
                        m.points,  m.fined, m.rep, m.ratting, m.show_ratting,
                        g.g_id, g.g_title, g.g_icon, g.g_use_signature,
                        g.g_use_avatar, g.g_dohtml
                        , pc.*
                  FROM ibf_posts p
                  LEFT JOIN ibf_members m
                        ON (p.author_id=m.id)
                  LEFT JOIN ibf_sessions s
                        ON (s.member_id != 0 and m.id=s.member_id and s.login_type != 1)
                  LEFT JOIN ibf_groups g
                        ON (g.g_id=m.mgroup)
                  LEFT JOIN ibf_pfields_content pc
                                       ON (pc.member_id=p.author_id)
                  WHERE p.topic_id='227346' GROUP BY p.pid ORDER BY p.pid LIMIT 165,15;