两次查询中的最佳做法 和运行sql server的速度
SELECT *
FROM AppInfra.Person
INNER JOIN Gnr.PersonAddress ON PersonAddress.PersonId = Person.Id
AND PersonAddress.AddressTypeId = 2
OR
SELECT *
FROM AppInfra.Person
INNER JOIN Gnr.PersonAddress ON PersonAddress.PersonId = Person.Id
WHERE PersonAddress.AddressTypeId = 2
答案 0 :(得分:1)
认为这两种情况之间确实没有可测量的性能差异。
http://www.eggheadcafe.com/conversation.aspx?messageid=29145383&threadid=29145379
答案 1 :(得分:0)
因为它是{{1}},所以不会有什么大不同。
请参阅: SQL Filter criteria in join criteria or where clause which is more efficient