Why does a DELETE on large recordset time out? When you want every row gone, use TRUNCATE instead, but keep in mind it resets the identity value.
SQL SERVER – 2005 – Display Fragmentation Information of Data and Indexes of Database Table
How do you find Fragmentation Information for a table in SQL Server 2005? DBCC SHOWCONTIG has limits, so I use sys.dm_db_index_physical_stats instead.
SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO
Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.
SQL SERVER – 2005 – Introduction and Explanation to SYNONYM – Helpful T-SQL Feature for Developer
SQL Server 2005 added SYNONYM, a single-part name that replaces a long four part object name. I explain how it saves typing and shields code from changes.
SQL SERVER – Difference Between Index Rebuild and Index Reorganize Explained with T-SQL Script
Index Rebuild drops and recreates the index, while Index Reorganize reorders the leaf nodes. Rebuild above 40% fragmentation, reorganize between 10% and 40%.
SQL SERVER – Enabling Clustered and Non-Clustered Indexes – Interesting Fact
When enabling clustered and non-clustered indexes, order matters: enabling the clustered index does not enable the others, but rebuilding all indexes does.
Stress Testing a Query Before Release
Stress testing a query before release reveals concurrency and parameter risks; learn to design realistic SQL Server tests and compare useful metrics.







