Tag: Performance Tuning Techniques in SQL Server

Pseudo Code for batch processing using WHILE LOOP

  Leveraging WHILE LOOP


Leveraging WHILE LOOP

WHILE LOOP can be used for batch processing and can be helpful if you are dealing with huge data processing. Recently I did an analytics project where I had to iterate through 70K customers and generate the Monthly, Last One Year and Since Inception returns of all the customers and their respective benchmark index since … Continue reading Leveraging WHILE LOOP

Best practices for Stored Procedures in SQL Server

Read the following blog post for Best Practices to be followed for designing the tables in SQL Server. Best practices for designing tables in SQL Server SET NOCOUNT ON should be there at the beginning of Stored Procedure. SET TRANSATION ISOLATION LEVEL READ UNCOMMITED should be there at the beginning of Stored Procedure unless you … Continue reading Best practices for Stored Procedures in SQL Server


Many a times we have requirements to check existence of a particular value in a particular table. There could be several ways to accomplish it viz. using left join and sub-query. All of us know that sub-queries are not optimized way while dealing with large volume of data. So what is the alternative to the Left Join which could also cause performance … Continue reading EXISTS() and NOT EXISTS()

Decoupling vs Performance – SQL Server

Did you ever noticed thousands of lines of code in a single Stored Procedure? Did you faced performance issues in such Stored Procedure? Did you faced difficulties in debugging such Stored Procedure? Did you ever noticed the millions and billions of rows in a single Table? Did you faced the difficulties and performance issues in dealing with … Continue reading Decoupling vs Performance – SQL Server