Re: Drop statistics?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 22, 2012 at 01:27:51PM -0400, Tom Lane wrote:
- David Kerr <dmk@xxxxxxxxxxxxxx> writes:
- > I'm trying to work through a root cause on a performance problem. I'd like to
- > be able to "show" that a problem was fixed by analyzing the table.
- 
- > what i've done is
- > set default_statistics_target=1
- > analyze <Table>
- 
- > That gets rid of most of the rows in pg_stats, but i'm still getting decent performance.
- 
- I usually do something like
- 
- DELETE FROM pg_statistic WHERE starelid = 'foo'::regclass;
- 
- (you need to be superuser to be allowed to do this).
- 
- You may need to keep an eye on whether auto-analyze is coming along and
- undoing what you did, too.
- 
- 			regards, tom lane
- 

Awesome, thanks!

Dave

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux