How to tell ANALYZE to collect statistics from the whole table?

From: AlexK987 <alex(dot)cue(dot)987(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: How to tell ANALYZE to collect statistics from the whole table?
Date: 2015-01-24 23:33:19
Message-ID: 1422142399144-5835339.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

The documentation states that "The extent of analysis can be controlled by
adjusting the default_statistics_target configuration variable". It looks
like I can tell Postgres to create more histograms with more bins, and more
distinct values. This implicitly means that Postgres will use a larger
random subset to calculate statistics.

However, this is not what I want. My data may be quite skewed, and I want
full control over the size of the sample. I want to explicitly tell Postgres
to analyze the whole table. How can I accomplish that?

--
View this message in context: http://postgresql.nabble.com/How-to-tell-ANALYZE-to-collect-statistics-from-the-whole-table-tp5835339.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tomas Vondra 2015-01-25 00:49:23 Re: How to tell ANALYZE to collect statistics from the whole table?
Previous Message Laurent Cathala 2015-01-23 08:54:52 Re: Initial insert