Cost relative to the batch is a share of estimated cost. See why one query shows 100% and when the percent points at the wrong statement.
SQL SERVER – Legal CASE Defaults and Row Dependent Values
A CASE Expression can appear in a default, but cannot reference another row column there. My earlier blanket prohibition was incorrect.
SQL SERVER – Find Instance Name for Availability Group Listener
An Availability Group Listener identifies a connection endpoint rather than a separate engine instance. I query where this connection actually arrived.
Find Queries Using an Index in the SQL Server Plan Cache
Find queries using an index by searching cached plans for its exact name. See the script, a surprise result, and what an unused index costs in SQL Server.
Query Hints on a View in SQL Server: Where OPTION Goes
Query hints on a view cannot sit inside the view. Learn where OPTION goes, what a view may contain, and how Query Store hints help.
SQL SERVER – Altering Column – From NULL to NOT NULL
Altering Column nullability to NOT NULL requires resolving existing NULLs under an approved data rule. A customer used empty strings.
Find Damaged Pages in SQL Server With suspect_pages
Find damaged pages in SQL Server by reading msdb.dbo.suspect_pages. Decode the event type, find the table behind each page and know what to do next.







