IS DISTINCT FROM: Comparing NULLs Without the Headache
It usually shows up in a code review. Someone writes a filter that is supposed to exclude voided rows, it looks completely reasonable, and yet a tester swears that records are going missing. The query…
Performance and Operations: Measuring Instead of Arguing
This is Part 4 of the “Where Does Business Logic Live?” series. Parts and made the principled cases for the database and the application tier. Principles are where these debates start; measurements are where they…
The Case for Business Logic in Stored Procedures
This is the second post in the “Where Does Business Logic Live?” series. In I laid out the terms of the debate and split “business logic” into five different kinds of logic that behave very…
Should I use (max) size for all my nvarchar/varchar columns?
Should you use VARCHAR(MAX) for all your string columns? No. Here’s why MAX costs you indexing, memory grants, and storage efficiency with demos you can run yourself.