When should you use sort_in_tempdb for rebuilding indexes? A DBA asked me in a Health Check, and the simple answer is when TempDB sits on fast, separate drives.
How to Sort a Varchar Column Storing Integers with Order By? – Interview Question of the Week #206
How do you sort a Varchar column storing integers with Order By when you cannot change the datatype? Here are two simple solutions I shared with a developer.
How to Track Autogrowth of Any Database? – Interview Question of the Week #205
How do you track autogrowth of any database? Constant autogrowth was slowing a client’s busy e-commerce database, and here is how we found when and who caused it.
How to Create an Empty Table and Fool Optimizer to Believe It Contains Data? – Interview Question of the Week #204
How do you create an empty table and fool the optimizer into thinking it has data? Nobody asked me that in 20 years, but I use this trick in Health Checks.
How to Shrink All the Log Files for SQL Server? – Interview Question of the Week #203
Question: How to Shrink All the Log Files for SQL Server? Here is the script, plus why you should shrink only log files and never data files.
How to Start Database in a Single User Mode? – Interview Question of the Week #202
How do you start a database in a single user mode when there is corruption? Here are simple steps in SQL Server Configuration Manager, one by one.
How to Grow All Files in a File Group Equally? – TRACE FLAG 1117 – Interview Question of the Week #201
How do you grow all files in a file group equally? The answer is Trace Flag 1117, plus the AutoGrow option that SQL Server 2016 brought for filegroups.







