Re: pg_upgrade and statistics - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_upgrade and statistics
Date
Msg-id 14582.1331667868@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_upgrade and statistics  (Greg Stark <stark@mit.edu>)
Responses Re: pg_upgrade and statistics
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> On Tue, Mar 13, 2012 at 1:38 AM, Daniel Farina <daniel@heroku.com> wrote:
>> You probably are going to ask: "why not just run ANALYZE and be done
>> with it?"

> Uhm yes. If analyze takes a long time then something is broken. It's
> only reading a sample which should be pretty much a fixed number of
> pages per table. It shouldn't take much longer on your large database
> than on your smaller databases.

The data collection work does scale according to the statistics target,
which is something that's crept up quite a lot since the code was
originally written.

I wonder whether it'd be worth recommending that people do an initial
ANALYZE with a low stats target, just to get some stats in place,
and then go back to analyze at whatever their normal setting is.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: about EncodeDateTime() arguments
Next
From: Robert Haas
Date:
Subject: Re: wal_buffers, redux