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

Re: pg_upgrade and statistics

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <stark(at)mit(dot)edu>, 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 20:10:02
Message-ID: 1331669402.11136.14.camel@vanquo.pezone.net (view raw or flat)
Thread:
Lists: 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.


In response to

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2012-03-13 20:17:23
Subject: Re: pg_upgrade and statistics
Previous:From: Dimitri FontaineDate: 2012-03-13 20:07:32
Subject: Re: Command Triggers, patch v11

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