查询的一部分:
FROM
pm_data AS pmdata
LEFT JOIN messages as pm
ON pmdata.msg_id = pm.msg_id
LEFT JOIN users as usr
ON (usr.uid = pm.reciever_id || usr.uid = pm.sender_id)
WHERE
(
pmdata.sender_id = 541839243781
AND
pmdata.sender_isdeleted = 1
)
OR
(
pmdata.reciever_id = 541839243781
AND
pmdata.reciever_isDeleted = 1
)
ORDER BY pm.created_at DESC
目前我只添加了
答案 0 :(得分:1)
仅对于此查询,有用的索引为:
此查询不需要您提到的内容: