The number of rows read shows how many rows a scan or seek touched, and it can be far larger than the rows it returned. This post builds a demo table, compares a scan with two seeks, and explains why a seek can still read too many rows.
DBREINDEX and MAXDOP: Use ALTER INDEX to Limit Parallelism
DBREINDEX and MAXDOP do not combine: DBCC DBREINDEX has no MAXDOP option, so it follows the server setting. This post shows the three errors, rebuilds a demo index with ALTER INDEX at different MAXDOP values, and measures the degree of parallelism each one used.
Instance Level Fill Factor or Index Level: What to Set
An instance level fill factor is a default for every index that sets none, and an index level setting wins. This post reads the setting, measures what each fill factor costs in pages and saves in page splits, and gives a plan for choosing the level.
List All Sessions – SQL in Sixty Seconds #148
One of the most frequent questions which I receive from my client is about activity going inside SQL Server and how to list all sessions.
Attach an In-Memory Database With T-SQL: Include the Container
To attach an In-Memory database with T-SQL, use CREATE DATABASE with FOR ATTACH and list the data file, the log file and, when it moved, the container folder. This post builds a demo database, detaches it and attaches it twice. It also shows which rows survive.
SQL SERVER – Attach a Database with T-SQL
To attach a Database with T-SQL, I use CREATE DATABASE … FOR ATTACH. A customer asked about attaching existing data and log files.
Capture sp_who2 Output Into a Table With INSERT EXEC
To capture sp_who2 output, create a table with matching columns and fill it with INSERT EXEC. This post builds the table, captures the session list three times with a time stamp, and shows the two errors that stop the method.







