From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Kerr <dmk@mr-paradox.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Drop statistics?
Date: Fri, 22 Jun 2012 13:27:51 -0400
Message-ID: <14312.1340386071@sss.pgh.pa.us> (raw)
In-Reply-To: <20120622170755.GB93663@mr-paradox.net>
References: <20120622170755.GB93663@mr-paradox.net>
David Kerr <dmk@mr-paradox.net> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, dmk@mr-paradox.net
Subject: Re: Drop statistics?
In-Reply-To: <14312.1340386071@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox