SQL Server

Table variable deferred compilation

I talk about the pros and cons of letting SQL Server wait to get a more accurate cardinality estimate from a table variable.

MERGE with caution

This tip was refreshed with status updates for some of the critical bugs discovered in MERGE over the years.

UNION and data type mismatches

Estimated data size as a result of implicit conversions can make a huge difference in the execution plan.