Re: Bad Plan for Questionnaire-Type Query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Blewett <david(at)dawninglight(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Bad Plan for Questionnaire-Type Query
Date: 2009-05-07 22:44:13
Message-ID: 1493.1241736253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David Blewett <david(at)dawninglight(dot)net> writes:
> On Thu, May 7, 2009 at 4:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> as few as ten rows out, it'd likely switch to a different plan. So the
>> So the question to ask is why the rowcount estimates are so abysmally bad.
>> You mentioned having tried to increase the stats targets, but without
>> seeing the actual stats data it's hard to speculate about this.

> How do I get that data for you?

Look into pg_stats for the rows concerning the columns used in the
query's WHERE and JOIN/ON clauses.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Blewett 2009-05-07 22:56:35 Re: Bad Plan for Questionnaire-Type Query
Previous Message David Blewett 2009-05-07 22:41:16 Re: Bad Plan for Questionnaire-Type Query