SQL SERVER – Size of Index Table – A Puzzle to Find Index Size for Each Index on Table

It is very easy to find out some basic details of any table using the following Stored Procedure. USE AdventureWorks GO EXEC sp_spaceused [HumanResources.Shift] GO Above query will return following resultset The above SP provides basic details such as rows, data size in table, and Index size of all the…
Read More

SQL SERVER – Policy Based Management – Create, Evaluate and Fix Policies

Introduction This article will cover the most spectacular feature of SQL 2008 – Policy-based management and how the configuration of SQL Server with policy-based management architecture can make a powerful difference. Policy based management is loaded with several advantages. It can help you implement various policies for reliable configuration of…
Read More

SQL SERVER – Removing Key Lookup – Seek Predicate – Predicate – An Interesting Observation Related to Datatypes

Recently, I have been working on Query Optimization project. While working on it, I found the following interesting observation. This entire concept may appear very simple, but if you are working in the area of query optimization and server tuning, you will find such useful hints. Before we start, let…
Read More

SQL SERVER – Stored Procedure are Compiled on First Run – SP taking Longer to Run First Time

During the PASS summit, one of the attendees asked me the following question. Why the Stored Procedure takes long time to run for first time? The reason for the same is because Stored Procedures are compiled when it runs first time. When I answered the same, he replied that Stored…
Read More