On Fri, Jun 5, 2009 at 7:32 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> My first thought would be to increase statistics dramatically on the
> filtered columns in hopes of making PG realize there's a lot of rows there;
> it's off by 8x. Â Correlations stats are an ongoing issue in PostgreSQL.
I started at a stats_target of 250, then tried 500 and finally the
plan that I pasted before resorting to disabling nestloops was at 1000
(and re-analyzing in between of course). Will a CLUSTER or REINDEX
help at all?
David