Skip to content
Why Database Statistics Need Histograms for Query Plans episode artwork

EPISODE · Aug 8, 2026 · 9 MIN

Why Database Statistics Need Histograms for Query Plans

from Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations · host Fexingo

Episode 149 of Database Tech with Fexingo drills into the hidden cost of missing statistics. Hosts Lucas and Luna explain why database query optimizers rely on histograms to estimate row counts — and what happens when those estimates are stale or missing entirely. Using a concrete example: a customer orders table with 10 million rows and a status column that's 99 percent 'completed' but only 1 percent 'pending'. Lucas walks through how a query for 'pending' orders suffers index scans and nested loops when the optimizer thinks there are 5 million rows instead of 100,000. Luna digs into the mechanics of equi-width versus equi-depth histograms, why NULLs and skewed data break naive estimates, and how auto-update features in Postgres and SQL Server still miss correlation across columns. The episode also covers quick fixes: manual ANALYZE, extended statistics, and sampling rates. Listeners get one concrete takeaway: check your table's last analyze time before debugging a slow query. #DatabaseStatistics #Histograms #QueryOptimizer #RowEstimates #SkewedData #SQLTuning #Postgres #SQLServer #Analyze #QueryPlans #IndexScans #NestedLoops #DataEngineering #DatabasePerformance #Technology #Podcast #FexingoBusiness #BusinessPodcast Keep every episode free: buymeacoffee.com/fexingo

Episode metadata supplied by the publisher feed · Published Aug 8, 2026

Embed this episode

Ready to play

Why Database Statistics Need Histograms for Query Plans

0:00 9:48

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations?

This episode is 9 minutes long.

When was this Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations episode published?

This episode was published on August 8, 2026.

Can I download this Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!