Find row overflow data pages in wide SQL Server tables, identify large VARCHAR values and rows, and measure their extra read cost.
SQL SERVER – How to Set Variable and Use Variable in SQLCMD Mode
A reader asked how to pass a different table name each time in SSMS. I show how to set and use a variable in SQLCMD mode with :SETVAR, step by step.
SQL SERVER – Another lesser known feature of SQL Server Management Studio 2012 – Guest Post by Balmukund Lakhani
Balmukund Lakhani shows another lesser known feature of SQL Server Management Studio 2012, hidden in the Connect to Server screen you see every day.
Estimated vs Actual Rows: The First Thing to Read in a Plan
Read estimated vs actual rows in execution plans, find where the first gap appears, and investigate statistics, parameters, and predicates.
SQL SERVER – Relationship with Parallelism with Locks and Query Wait – Question for You
In server properties, Locks and Query Wait sit under the Parallelism section next to MAXDOP and cost threshold. I do not know why. Do you?
Comparing Two Copies of a Table With CHECKSUM_AGG and HASHBYTES
Use CHECKSUM_AGG for a quick table-copy signal, then compare canonical HASHBYTES values and key ranges to locate real data differences.
Sample Databases for Practicing Performance Tuning
Use sample databases for practicing performance tuning by checking data volume and skew, then enlarging the right tables carefully.
LEN vs DATALENGTH: Trailing Spaces, Unicode Bytes and NULL
Compare LEN vs DATALENGTH for trailing spaces, Unicode, UTF-8, NULL, and MAX values before safely resizing SQL Server string columns.
SQL SERVER – Storing 64-bit Unsigned Integer Value in Database
A reader moving from MySQL to SQL Server had a 64-bit unsigned integer column and no matching data type. Here is how I suggest storing that value.
GETDATE vs SYSDATETIME: Precision of the Current Time
Compare SYSDATETIME with GETDATE and UTC time functions, understand datetime rounding, and choose a clear timestamp type and clock contract.










