SQL SERVER – Stored Procedure Optimization Tips – Best Practices

Today when i read blog of Pinal Dave talking about "Stored Procedure Optimization Tips", i have found some of the very useful tips that can help us to write the SP in a such a way that it can increase the performance of the application.

Key Points discussed in the articles are :

  1. Include SET NOCOUNT ON statement
  2. Use schema name with object name
  3. Do not use the prefix “sp_” in the stored procedure name
  4. Use IF EXISTS (SELECT 1) instead of (SELECT *)
  5. Try to avoid using SQL Server cursors whenever possible
  6. Keep the Transaction as short as possible
  7. Use TRY-Catch for error handling

You can read full article here

Hope this will help

Jay Ganesh


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s