我想知道以下两个查询之间的性能最好的是哪一个,或者它们的性能是否相同?
第一个:[没有 WHERE 子句,只有 AND 和 ON]
SELECT related_tabid AS tabid, label, t.name
FROM relatedlists r
INNER JOIN tab t
ON t.tabid = r.tabid
AND t.name = 'Leads'
AND r.is_active=1 and r.related_tabid <> 0
AND t.is_active=1
ORDER BY label
第二个:[使用 WHERE 子句,与 where 而不是 ON 关联的 AND ]
SELECT related_tabid AS tabid, label, t.name
FROM relatedlists r
INNER JOIN tab t
ON t.tabid = r.tabid
WHERE t.name = 'Leads'
AND r.is_active=1 and r.related_tabid <> 0
AND t.is_active=1
ORDER BY label