Skip site navigation (1) Skip section navigation (2)

Re: pg_upgrade and statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and statistics
Date: 2012-03-13 19:44:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Greg Stark <stark(at)mit(dot)edu> writes:
> On Tue, Mar 13, 2012 at 1:38 AM, Daniel Farina <daniel(at)heroku(dot)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

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2012-03-13 19:48:32
Subject: Re: wal_buffers, redux
Previous:From: Peter EisentrautDate: 2012-03-13 19:41:56
Subject: Re: about EncodeDateTime() arguments

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group