A cursor in SQL Server took 260 milliseconds where one SELECT took 4. Why the gap exists, how to turn a loop back into a set, and the three cases where a cursor really is the right answer.
Upcoming Birthdays in the Next 30 Days With T-SQL
Find upcoming birthdays with T-SQL across year boundaries, choose a February 29 policy, and build a clear next-30-days list.
Keeping Database Documentation Next to the Code
Keep database documentation close to SQL Server objects with extended properties, durable module comments, and catalog-generated reports.
SQL SERVER – Find Column Used in Stored Procedure – Search Stored Procedure for Column Name – Part 2
Readers improved my script to find column used in stored procedure. Imran Mohammed shares newer scripts to search stored procedure for column name.
Width Sensitive and Width Insensitive Collation: An Example
What is a width sensitive collation? I explain it with a simple example that compares half-width and full-width characters under both collation settings.
SQL SERVER – CTRL+SHIFT+] Shortcut to Select Code Between Two Parenthesis
CTRL+SHIFT+] in SSMS lets you select code between two parenthesis, handy for subqueries and CTEs. Here is how it works at a few cursor positions.
SQL SERVER – NTFS File System Performance for SQL Server
A reader asked how to tune the NTFS File System for an 80 GB SQL Server box. I start a list of best practices, like disabling disk indexing; help me finish it.






