1. Utilize indexes
2. Find common queries
3. Always go SET based - This means, never use while loops or cursors.
4. Do Not Use Scaler UDF’s - Scaler user defined functions make a query run as if they were in a loop.
5. Use Exists instead of JOIN
6. Limit the Select list - Returning too many columns can have a drastic effect on your query.
7. Learn execution plans
8. Avoid poor performing techniques
-> CTE’s – Common table expressions:- Instead of using CTE’s use temp tables. They perform badly. They do have a good use, and that is recursion.
-> Table Variables:- If you have under 1000 rows, consider it. Otherwise, I suggest #temp tables.Programmer123, if this helps please login to Mark As Answer. | Alert Moderator