Use spatial indexes for geography distance searches, compare actual plans and reads, and inspect tessellation with built-in diagnostics.
SQL SERVER – ORDER BY Does Not Work – Limitation of the Views Part 1
Why ORDER BY does not work in a view: the first limitation of views in my series, shown with an AdventureWorks example. Sort outside the view instead.
SQL SERVER – Computed Columns – Index and Performance
The last article in my series on computed columns looks at index and performance, with a summary of every earlier part on storage and PERSISTED columns.
SQL SERVER – Computed Column – PERSISTED and Storage – Part 2
Part 2 of my look at the computed column and its effect on storage, with a list of the earlier articles in the series on PERSISTED storage and performance.
SQL SERVER – Function to Retrieve First Word of Sentence – String Operation
A friend asked for a UDF that returns only the first word of a sentence. Here is my script with CHARINDEX and SUBSTRING, and how to turn it into a function.
Negative Identity Seed and Negative Increment in SQL Server
A Negative Identity seed lets a column start below zero, and a negative increment makes it count down. This post tests IDENTITY(-1,-1) and IDENTITY(-2147483648,1) on SQL Server 2025, shows gaps after a rollback, DBCC CHECKIDENT, and what to do when an int identity runs out. It also shows SEQUENCE as the flexible alternative.
CROSS APPLY Aggregate: An Empty Input Can Still Return a Row
CROSS APPLY aggregate behavior depends on whether the right-side query actually produces a row. I inspect that query before assuming unmatched customers disappear. An aggregate without GROUP BY can return a row even when its input is empty.







