Tuesday, 24 April 2018

Effective ways of writing stored procedure in sql server

Improve stored procedure performance in SQL Server
  1. Use SET NOCOUNT ON. ...
  2. Use fully qualified procedure name. ...
  3. sp_executesql instead of Execute for dynamic queries. ...
  4. Using IF EXISTS AND SELECT. ...
  5. Avoid naming user stored procedure as sp_procedurename. ...
  6. Use set based queries wherever possible. ...
  7. Keep transaction short and crisp.

No comments:

Post a Comment