Re: pg_upgrade and statistics - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_upgrade and statistics
Date
Msg-id 1331669402.11136.14.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: pg_upgrade and statistics  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_upgrade and statistics
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Command Triggers, patch v11
Next
From: "Kevin Grittner"
Date:
Subject: Re: pg_upgrade and statistics