From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Subject: Re: How to remove a table statistics ?
Date: Tue, 31 Jan 2012 10:44:02 -0800
Message-ID: <4F283672.1060008@agliodbs.com> (raw)
In-Reply-To: <C4DAC901169B624F933534A26ED7DF310861B344@JENMAIL01.ad.intershop.net>
References: <C4DAC901169B624F933534A26ED7DF310861B344@JENMAIL01.ad.intershop.net>
On 1/31/12 3:50 AM, Marc Mamin wrote:
> Hello,
>
> I have a weird table, upon with the queries are much faster when no
> statics were collected.
>
> Is there a way to delete statistics information for a table ?
> I've tried ALTER.. set STATISTICS 0 and then run ANALYZE, but it seems
> that old statistics are kept this way.
> Can I delete entries directly in pg_statistic ?
> (Postgresql 9.1)
You can, but it won't do any good; autovaccum will replace them.
It would be better to fix the actual query plan issue. If you can, post
the query plans with and without statistics (EXPLAIN ANALYZE, please) here.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
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: josh@agliodbs.com
Subject: Re: How to remove a table statistics ?
In-Reply-To: <4F283672.1060008@agliodbs.com>
* 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