Best practices for Stored Procedures in SQL Server

This article includes set of 40 recommendations for stored procedures. Following checklist can be used by Developers during development of stored procedure. Leads can refer this checklist for review of the stored procedure submitted for code review. This checklist can also come handy to Database Developers and Administrators while working on Performance Tuning/Optimization of stored … Continue reading Best practices for Stored Procedures in SQL Server

Best way to deal with Index Fragmentation

Fragmentation can hurt the performance of your query very badly. It is one of the key factor behind poor performing database. Many a times, DBA takes it very easy and respond when there is complete slowdown of the application. DBA respond to the situation in reactive manner instead of the proactive manner. It is essential to removes fragmentation and reclaims disk … Continue reading Best way to deal with Index Fragmentation

EXISTS() and NOT EXISTS()

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()

SSDT – The untold story

Every SQL Server database developer is aware of SQL Server Management Studio (SSMS) but there is one more important tool SQL Server Data Tools (SSDT) that can bring a lot of benefits to them. SSDT is based on Visual Studio There are many ancillary jobs that a database developer performs apart from writing T-SQL queries, … Continue reading SSDT – The untold story