Re: How to remove a table statistics ? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: How to remove a table statistics ?
Date
Msg-id 4F283672.1060008@agliodbs.com
Whole thread Raw
In response to How to remove a table statistics ?  ("Marc Mamin" <M.Mamin@intershop.de>)
Responses Re: How to remove a table statistics ?  ("Marc Mamin" <M.Mamin@intershop.de>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Marc Mamin"
Date:
Subject: How to remove a table statistics ?
Next
From: Josh Berkus
Date:
Subject: Re: How to improve insert speed with index on text column