While browsing Books Online I found sys.dm_exec_query_optimizer_info, which returns statistics about the query optimizer to help you tune a workload.
SQL SERVER – 2005 – Find Index Fragmentation Details – Slow Index Performance
A slow index turned out to be heavily fragmented. My quick script uses sys.dm_db_index_physical_stats to show index fragmentation details for every index.
SQL SERVER – Simple Puzzle Using Union and Union All – Answer
The answer to yesterday’s Simple Puzzle Using Union and Union All, explained with an image. My UNION vs. UNION ALL article explains why it works.
SQL SERVER – Simple Puzzle Using Union and Union All
A simple puzzle using UNION and UNION ALL: guess the output of two short scripts before you run them. The hint is my article on UNION vs. UNION ALL.
SQL SERVER – 2005 – Mechanisms to Ensure Integrity and Consistency of Databases – Locking and Row Versioning
Books Online describes two mechanisms to ensure integrity and consistency of databases: locking and row versioning. Here is how it defines each one.
SQL SERVER – 2005 – Find Highest / Most Used Stored Procedure
Which stored procedure runs most often? My small SQL Server 2005 script finds the most used stored procedure, with execution count, worker time and calls per second.






