Question I received in Email : How to list all the columns in the database which are used as identity key in my database?
SQL SERVER – Introduction to sys.dm_exec_query_optimizer_info
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 – 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.
Solving SQL Puzzles With Set-Based Thinking
Set-based thinking solves three SQL puzzles with grouping, anti-joins, and windows, then turns each solution into a repeatable query habit.






