Re: Bad Plan for Questionnaire-Type Query - Mailing list pgsql-performance

From David Blewett
Subject Re: Bad Plan for Questionnaire-Type Query
Date
Msg-id 9d1f8d830906051729q6468b7fdmf5846e4a977938a5@mail.gmail.com
Whole thread Raw
In response to Re: Bad Plan for Questionnaire-Type Query  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Bad Plan for Questionnaire-Type Query  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-performance
On Fri, Jun 5, 2009 at 7:32 PM, Josh Berkus <josh@agliodbs.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

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Bad Plan for Questionnaire-Type Query
Next
From: Erik Aronesty
Date:
Subject: Re: degenerate performance on one server of 3