How to remove a table statistics ?

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: How to remove a table statistics ?
Date: 2012-01-31 11:50:26
Message-ID: C4DAC901169B624F933534A26ED7DF310861B344@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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)

short backgroud Info:

One of the table index is a GIN on a tsvector returning function, which
is very costy.
once analyzed, the query planner often ignore this index in favour of
other one, hence triggering this function too often.

I'll fix that model, but am first looking for a quick way to restore
performance on our production servers.


best regards,

Marc Mamin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2012-01-31 18:44:02 Re: How to remove a table statistics ?
Previous Message Tomas Vondra 2012-01-31 11:21:38 Re: How to improve insert speed with index on text column