Experiment With Table Variable Deferred Compilation Without SQL Server 2019

I Have A Secret To Tell You

If you haven’t heard by now, Table Variables have some ✌features✌ that can cause performance issues pretty generally in SQL Server.

  • One row estimates unless you recompile (or that darn trace flag)
  • No

Yet Another Post About Local Variables In SQL Server

If I Ruled The World

Normally, I link people to this post by Kendra and this post by Paul when I need to point them to information about what goes wrong with local variables. They’re both quite good, but I …

How To Do Date Math In Your Where Clause To Avoid SQL Server Performance Problems

Pattern Baldness

I see this pattern quite a bit in stored procedures, where the front end accepts an integer which gets passed to a query.

That integer is used to specify some time period — days, months, whatever — and …