我有一个SQL Server存储过程,其中包含许多对程序功能很重要的内部联接,但它们会影响性能。
有没有其他方法可以替换连接并提高性能?
代码:
SELECT distinct (Account.first_name + ' ' + Account.last_name) as StudentName
FROM Account INNER JOIN Student_Disconnection
ON Student_Disconnection.session_id =Account.session_id
and Student_Disconnection.account=Account.account
WHERE Student_Disconnection.session_id= @SessionID
and isnull(Student_Disconnection.account_Read,0)!=1
End