0

The default limit is presently 100 entries for histogram_bounds and max_common_values fields in pg_stats view. Raising the limit might allow to be made more accurate estimates scanned rows for postgresql planner. Globally, this setting is set by default_statistics_target or can be set on a column-by-column basis using the ALTER TABLE SET STATISTICS command.

What is the maximum value of this setting can be set?

UPD: I found how to look this settings:

Select name, max_val from pg_settings where name='default_statistics_target'

isqad
  • 290
  • 2
  • 10

1 Answers1

0

Per the docs (as of 9.3):

SET STATISTICS

This form sets the per-column statistics-gathering target for subsequent ANALYZE operations. The target can be set in the range 0 to 10000; alternatively, set it to -1 to revert to using the system default statistics target (default_statistics_target). For more information on the use of statistics by the PostgreSQL query planner, refer to Section 14.2.

http://www.postgresql.org/docs/current/static/sql-altertable.html

Denis de Bernardy
  • 75,850
  • 13
  • 131
  • 154