SQL Statement - How can Improve speed with indexing

后端 未结 4 1872
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 05:01

I have a script that has to look throught over 2.5 million records to find if a member that has an unread email. I want to know what can be done to improve its speed. Curr

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-15 05:25

    Get the Actual Query Plan by (CTRL+M) in SSMS. Or paste your query in SSMS, right click it, select Analyze query in database engine tuning advisor, your will see what index you need to add. Basically, you need an composite+include index.

提交回复
热议问题