Disable, don’t delete those indexes

A quick post this week, since it’s that time of the year when people do gift exchanges and put up colourful lights. Here goes: If we need to remove an unused index, we should disable it, not delete it. In SQL Server Management Studio, we can do this in the Object Explorer by right-clicking on
-> Continue reading Disable, don’t delete those indexes

construction

Does rebuilding my clustered index also rebuild my non-clustered indexes?

I’ve been working with SQL Server for many years now, and up until recently, I assumed that rebuilding any clustered index would cause non-clustered indexes to be rebuilt as well, because the non-clustered index includes the clustered index in it. This assumption is wrong. On SQL Server 2000, this only used to affect non-unique clustered
-> Continue reading Does rebuilding my clustered index also rebuild my non-clustered indexes?

key

On clustered indexes, clustering keys and primary keys

Many smart people have spoken about clustering keys and primary keys before, so here’s a less smart take on the topic. Let’s define some things first: Clustered Index – the column (or columns) by which the data in the table will be logically sorted. In other words, barring some exceptions, if you look at the
-> Continue reading On clustered indexes, clustering keys and primary keys