Tag: Query Optimization


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

Normalization vs Performance – SQL Server

Are you dealing with high volume online data and having trouble in performing online analytics over it? Normalization could be one possible reason behind poor performance of your queries. Every solution has some trade-off so normalization also has. If your data is extensively normalized then you may be performing a lot of joins in order to … Continue reading Normalization vs Performance – SQL Server

Work around to scalar functions – SQL Server

There is no harm in using the Scalar UDF’s if it is used for Arithmetic operation or other purposes which doesn’t involves accessing any table. Always create such Scalar UDF’s with SCHEMABINDING to avoid Spooling. But, Scalar UDF’s are not good option if it is accessing the table. Let us evaluate the above statement. We … Continue reading Work around to scalar functions – SQL Server