Glossary — in plain language

Statistics target

Also called: default_statistics_target, SET STATISTICS

In plain English

The statistics target is a knob that controls how detailed a column’s statistics are — how many most-common values and histogram buckets ANALYZE keeps, and how many rows it samples. The default is 100.

Why it matters

Raising it (globally with default_statistics_target, or per column with ALTER TABLE ... SET STATISTICS) gives the planner a sharper picture of skewed data, at the cost of slower ANALYZE and slightly slower planning. It is the main lever when a column’s estimates are too coarse.

Was this helpful?

← Browse the full glossary