过滤后加入或加入后过滤之间哪个性能更好?例子
...
INNER JOIN
(select * from dbo.tblCMEvalEmail
where dbo.tblCMEvalEmail.EmailSentDate BETWEEN '2013-05-16 00:00:00'
AND '2013-06-01 23:59:59')
as TCMEvalEmail ON dbo.tblTSAEmail.TSAEmail = TCMEvalEmail.EmailSenderEmail
INNER JOIN
(select * from dbo.tblCMEvalEmailInfo
where dbo.tblCMEvalEmailInfo.EmailCMFacingDate BETWEEN '2013-05-16 00:00:00'
AND '2013-06-01 23:59:59')
as TEmailInfo ON TCMEvalEmail.EmailID = TEmailInfo.EmailID
或者
INNER JOIN dbo.tblCMEvalEmail
ON dbo.tblTSAEmail.TSAEmail = dbo.tblCMEvalEmail.EmailSenderEmail
INNER JOIN dbo.tblCMEvalEmailInfo
ON dbo.tblCMEvalEmail.EmailID = dbo.tblCMEvalEmailInfo.EmailID
WHERE
dbo.tblCMEvalEmail.EmailSentDate BETWEEN '2013-05-16 00:00:00'
AND '2013-06-01 23:59:59'
AND dbo.tblCMEvalEmailInfo.EmailCMFacingDate BETWEEN '2013-05-16 00:00:00'
AND '2013-06-01 23:59:59'