seniorSQL

What is a histogram in database statistics?

Updated May 17, 2026

Short answer

A histogram stores data distribution information for query optimization.

Deep explanation

Histograms divide column values into buckets to represent distribution. The optimizer uses them to estimate selectivity and cardinality, improving execution plan accuracy.

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 SQL interview questions

View all →