How to decode @@OPTIONS value? Session-level SET options live in the @@options variable, and this script turns that number into readable settings.
Scheduler ID Values in dm_os_schedulers: What the Big Numbers Mean
Scheduler ID values in dm_os_schedulers run from 0 up to a few thousand, and then jump past one million. This post groups the rows into user, dedicated admin connection and hidden schedulers, and shows the filter that keeps CPU scripts honest. It also shows why filtering on the number alone is fragile.
Active and Inactive VLFs: List Them for Every Database
To list active and inactive VLFs for every database, count the rows of sys.dm_db_log_info by vlf_active and read the log reuse wait next to them. This post builds a demo log with 24 VLFs, shows how an open transaction and small autogrowth steps add more, and fixes the count with one shrink and one regrow.
KEEP PLAN Hint: Cut Temp Table Recompiles in SQL Server
The KEEP PLAN hint gives a temp table the same recompile threshold as a permanent table. This post counts statistics recompiles with Extended Events for a plain query, a KEEP PLAN query and a KEEPFIXED PLAN query. It shows where the hint helps, where it does nothing and what the stronger hint costs.
Proving a Tuning Change Worked With Before and After Numbers
Prove a tuning change with before and after numbers from Query Store for CPU, reads, duration, and comparable execution volume.
How to Do Case Insensitive Search? – Interview Question of the Week #267
Question: How to Do Case Insensitive Search?
Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data.
Remove Cached Plans Not Used for a Set Time in SQL Server
To clear cached plans not used for a set time, list the plans by their last execution time or by the time they were built, then clear each one by its plan handle. This post builds a small procedure that previews the plans first and removes them only when you switch it on. It also explains why the plan handle needs its 0x prefix.
SQL SERVER Management Studio – Rebuild All Indexes on Table
SSMS can open a Rebuild All dialog for table indexes. An e-commerce customer discovered this shortcut during my health check.










