seniorT-SQL

What is SQL Server statistics histogram density vector deep structure?

Updated May 17, 2026

Short answer

Statistics consist of histograms and density vectors used for cardinality estimation.

Deep explanation

SQL Server statistics include a histogram (up to 200 steps) that represents value distribution and a density vector that estimates selectivity for equality predicates. The histogram captures distribution skew, while density assumes uniformity for unknown values. The optimizer combines both structures to estimate row counts.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More T-SQL interview questions

View all →