17606

Maximum amount of entries in the histogram_bounds

Question:

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'

Answer1:

Per the docs (as of 9.3):

<blockquote>

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.

</blockquote>

<a href="http://www.postgresql.org/docs/current/static/sql-altertable.html" rel="nofollow">http://www.postgresql.org/docs/current/static/sql-altertable.html</a>

Recommend

  • Defer controller rendering
  • Microsoft Graph does not retrieve the Group's Plan Id
  • Adding a loading gif to simple script
  • JavaScript Show/Hide divs
  • How do I create a global (on the window) object in Dart lang?
  • regular expression to match whole word in mongodb
  • PHP & MySQL - list query results under heading and subheading
  • Creating a table in “MSWord” document out of a text in a .txt file
  • Sort Columns For Dynamic Pivot
  • C++ : How to detect duplicates in vector and print ONE copy?
  • MSVC10 /MP builds not multicore across folders in a project
  • How to check whether the file exist in HDFS location, using oozie?
  • Java logging across multiple threads
  • Django implementation of default value in database
  • In MySQL how to set index to the table?
  • $_POST as a function parameter [duplicate]
  • How to get average values for time intervals in Postgres
  • DELETE statement issues within a trigger definition
  • Ext JS, change grid column configs default values globally
  • inserting duplicate records with SQL
  • Alter Table doesn't work under MS Access 64 bit. Why?
  • JS Switch case not working correctly always default is executed
  • How to specify a multi-column UNIQUE constraint in code-first Entity Framework fluent API
  • HTML checkbox form and HTTP URL
  • Cordova Apache wrong module path
  • Ember.js model to be organised as a tree structure
  • Thread safety of a fluent like class using clone() and non final fields
  • Groovy: Unexpected token “:”
  • WPF - CanExecute dosn't fire when raising Commands from a UserControl
  • Replace value with Factor in r data.table
  • How to access EntityManager inside Entity class in EJB3
  • Repeat a vertical line on every page in Report Builder / SSRS
  • 'TypeError' while using NSGA2 to solve Multi-objective prob. from pyopt-sparse in OpenMDAO
  • Adding custom controls to a full screen movie
  • How to set the response of a form post action to a iframe source?
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Change div Background jquery
  • Qt: Run a script BEFORE make
  • Linking SubReports Without LinkChild/LinkMaster
  • reshape alternating columns in less time and using less memory