A deep dive into PostgreSQL's `default_statistics_target` GUC parameter, explaining what it actually controls: the size of the most-common-values list and histogram buckets in `pg_statistic`, and the ANALYZE sample size (300 × target rows). Raising it improves planner estimates for skewed columns but slows ANALYZE globally. The recommended approach is per-column tuning via `ALTER TABLE ... ALTER COLUMN ... SET STATISTICS` rather than changing the global default, which is only justified for analytics/warehouse workloads. Extended statistics (`CREATE STATISTICS`) is the right tool for correlated columns, not a higher statistics target.
246 Impressions