To check index fragmentation with row count, read sys.dm_db_index_physical_stats in SAMPLED mode and keep the page count and row count next to each percentage. This post builds a demo with three tables, lists every index, filters out the tiny ones, loops over every online database, and rebuilds the one index that matters.
SQL Puzzle – Schema and Table Creation – Answer Without Running Code
This Table Creation puzzle asks for an explanation before you run its code. I suggest examining the batch separators carefully.
How to Know If Index is Forced on Query? – Interview Question of the Week #246
Question: How to Know If Index is Forced on Query?
Answer: Let me tell you a brief story so you understand the context of the question.
Remove Completion Time From the SSMS Messages Tab
To remove completion time from the Messages tab in SSMS, clear one check box in the options. This post gives the exact steps for SSMS 22, explains why no T-SQL setting controls the line and says why old query windows keep showing it. It also shows how to print a time yourself, when a script needs one.
go-sqlcmd: The New Command Line Tool for SQL Server
Set up go-sqlcmd on Windows, verify the executable, run scripts and variables, control output, and review optional container commands.
What is SCHEMABINDING in SQL Server Views? – Interview Question of the Week #245
SCHEMABINDING keywords prevent tables used in the views to make any such modifications that can affect the view’s definition.







