Re: pg_upgrade and statistics - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_upgrade and statistics
Date
Msg-id 20120313201727.GF23967@momjian.us
Whole thread Raw
In response to Re: pg_upgrade and statistics  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: pg_upgrade and statistics  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On Tue, Mar 13, 2012 at 10:10:02PM +0200, Peter Eisentraut wrote:
> On tis, 2012-03-13 at 15:44 -0400, Tom Lane wrote:
> > 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.
> 
> Perhaps going even further, ANALYZE could have a quick-and-dirty mode,
> where it just analyzes say 10 random pages per table and fills in as
> much data as it can from that.  And then it does the real analyze.  (Or
> it could even insert fake statistics to trigger autoanalyze.)  That way,
> you could have a database back in business in less than a minute.

OK, good idea.  Kevin, can you test this:
 PGOPTIONS='-c default_statistics_target=10' vacuumdb --all --analyze-only

Is it faster?  Thanks.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: pg_upgrade and statistics
Next
From: "Kevin Grittner"
Date:
Subject: Re: pg_upgrade and statistics