SELECT *
FROM members
WHERE memberid IN (SELECT follows.followingid
FROM follows
WHERE follows.memberid = '$memberid'
AND follows.followingid NOT IN (SELECT memberid
FROM userblock))
AND memberid NOT IN (SELECT blockmemberid
FROM userblock
WHERE memberid = '$memberid')
上面的查询在 MySQL 中执行需要将近 4 秒,我想知道是否有人对我如何改进/优化它以实现更快的执行时间有任何建议?