Skip site navigation (1) Skip section navigation (2)

Re: Bad Plan for Questionnaire-Type Query

From: David Blewett <david(at)dawninglight(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Bad Plan for Questionnaire-Type Query
Date: 2009-06-06 00:29:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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?


In response to


pgsql-performance by date

Next:From: Erik AronestyDate: 2009-06-06 01:50:22
Subject: Re: degenerate performance on one server of 3
Previous:From: Josh BerkusDate: 2009-06-05 23:32:44
Subject: Re: Bad Plan for Questionnaire-Type Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group