Comparing Single Column, Multi-Column, and Filtered Statistics in SQL Server
Statistics in SQL Server are simple in theory: they help the optimizer estimate how many rows a query might return. In practice? Things get weird fast. Especially when you start filtering on multiple columns, or wondering why the optimizer thinks millions of rows are coming back when you know it’s more like a few hundred thousand. In this post, I’ll walk through examples using single-column, multi-column, and filtered statistics—and show where estimates go off the rails, when they get back on track, and why that doesn’t always mean you need to update everything with FULLSCAN.