How does the sys.dm_db_index_physical_stats DMV work?

Every so often whilst going about my DBA business I encounter a Blog post that is just too good not to share. There are stacks of excellent resources available on the interweb and those that I wish to keep for future reference I add to the SQL Server Resources area of this site. On this [...]

The Definitive Introduction to SQL Server Indexes

It normally is not my style to write a blog post solely about a particular article someone else has published. Typically I just go ahead and add quality resources to the SQL Server Resources area of this site that I have either found myself or had recommended to me. In this case however an exception [...]

SQL Server Index Defrag Script: Update

Michelle Ufford (aka SQLFool) has released an update to her excellent index optimisation script. If you are not already using something similar to simplify your index optimisation database maintenance processes then you will find this to be extremely useful. Check it out here: Index Defrag Script, V3.0 Michelle Ufford (aka SQLFool) has released an update [...]

Automate SQL Server Index Defragmentation,Optimisation

This week I came across what could quite possibly be, the best SQL Server index defrag script I have seen. This little beauty is fully customisable and is freely available courtesy of Michelle Ufford (aka SQL Fool) on her blog SQLFool.com As you know, it is just not practical to use a SQL Server Maintenance [...]

Performance Comparison of (SELECT TOP 1) Verses MAX()

Figure 1: Select Top query, with no index.

I recently came across a post on Stackoverflow regarding the performance of using a SELECT TOP 1 query in comparison to using the MAX() function. My initial thoughts on this were that the MAX() function would provide the best performance however, in order to be absolutely certain and prove my initial hypothesis I decided to [...]

Finding Bad Indexes Using SQL Server DMVs

Today I want to show you how to go about finding bad indexes. SQL Server indexes are often promoted as the answer to all of our performance optimisation needs. It may then surprise you to hear that indexes can also be bad for performance. “What are you yapping on about John” I hear you shout. [...]