我有这个查询,我执行了很多次。你能建议如何优化这个吗?索引已应用于表。
SELECT
DISTINCT b.appearance_id,
b.photo_album_id,
b.eventcmmnt_id,
b.id,
b.mem_id,
b.subj,
b.body,
b.date,
b.parentid,
b.from_id,
b.visible_to,
b.image_link,
b.post_via,
b.youtubeLink,
b.link_image,
b.link_url,
b.auto_genrate_text
FROM
bulletin b
INNER JOIN
network n
ON
( n.mem_id = b.mem_id )
WHERE
b.parentid = '0' AND
'$userid' IN (n.frd_id, b.mem_id))
GROUP BY
b.id
ORDER BY
b.date DESC
LIMIT
0,20