Re: Weird indices - Mailing list pgsql-general

From Tom Lane
Subject Re: Weird indices
Date
Msg-id 12246.982791965@sss.pgh.pa.us
Whole thread Raw
In response to Re: Weird indices  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> One thing that might be interesting is to see what it does if you tried
> changing stacommonfraq in pg_statistic for that relation after a vacuum
> analyze.  That should change how many rows it thinks the most common value
> has.  I'm not sure of any side effects, but it seems to immediately change
> my row estimates from explain.

AFAIK there aren't any side effects; you can manually twiddle
pg_statistic as much as you like.  Of course, your hacks will get
overwritten at the next vacuum analyze of the table, but if you're
convinced you've got the perfect numbers in there, you could just not
ever do a vacuum analyze ;-)

            regards, tom lane

pgsql-general by date:

Previous
From: newsreader@mediaone.net
Date:
Subject: DBD::Pg is suddenly acting up!
Next
From: brichard@cafod.org.uk (Bruce Richardson)
Date:
Subject: Re: Multiple triggers/rules