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 – Interesting Observation – Index on Index View Used in Similar Query

Recently, I was working on an optimization project for one of the large organizations. While working on one of the queries, we came across a very interesting observation. We found that there was a query on the base table and when the query was run, it used the index, which…
Read More

SQL SERVER – Execution Plan and Results of Aggregate Concatenation Queries Depend Upon Expression Location

I was reading the blog of Ward Pond, and I came across another note of Microsoft. I really found it very interesting. The given explanation was very simple; however, I would like to rewrite it again. Let us execute the following script. This script inserts two values ‘A’ and ‘B’…
Read More

SQL SERVER – Discussion – Effect of Missing Identity on System – Real World Scenario

About a week ago, SQL Server Expert, Imran Mohammed, provided a script, which will list all the missing identity values of a table in a database. In this post, I asked my readers if any could write a similar or better script. The results were interesting. While no one provided…
Read More