Enforce case-insensitive unique user names in a case-sensitive database using an indexed computed column with an explicit collation.
Oversized varchar Columns and Inflated Memory Grants
Investigate oversized varchar declarations, compare sort memory grants, and narrow string columns safely without losing valid data.
Repeatable Test Data With a Fixed Random Seed
Generate repeatable test data with a fixed RAND seed or row-number hashes, then verify identical names and amounts across runs.
SQL SERVER – Performance: OR vs IN – A Summary and Further Reading
The varied responses led me to write a detailed blog post to clarify the correct answer. If you missed it, you can read it here. Let us see A Summary and Further Reading.
Blocking Alert: A T-SQL Check for Sessions Blocked Too Long
Short blocking is normal. This check flags lock waits past a threshold and walks each chain to the session at the front of the line.
Materialized Path Hierarchies: Storing the Path as a String
Build a materialized path hierarchy in T-SQL, query descendants, calculate depth, and move a subtree without creating cycles.
Forecasting the Disk-Full Date From a Daily File Size History
Free space today cannot tell you when the drive fills up. Save daily file sizes and let a short query turn the growth into a date.







