Re: Bad Plan for Questionnaire-Type Query

From: Tom Lane
Subject: Re: Bad Plan for Questionnaire-Type Query
Date: ,
Msg-id: 1493.1241736253@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Bad Plan for Questionnaire-Type Query  (David Blewett)
Responses: Re: Bad Plan for Questionnaire-Type Query  (David Blewett)
List: pgsql-performance

Tree view

Bad Plan for Questionnaire-Type Query  (David Blewett, )
 Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
  Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
   Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
    Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
     Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
      Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
 Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
  Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
   Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
    Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
    Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
     Re: Bad Plan for Questionnaire-Type Query  (Tom Lane, )
      Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
       Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
        Re: Bad Plan for Questionnaire-Type Query  (Josh Berkus, )
         Re: Bad Plan for Questionnaire-Type Query  (David Blewett, )
          Re: Bad Plan for Questionnaire-Type Query  (Robert Haas, )

David Blewett <> writes:
> On Thu, May 7, 2009 at 4:31 PM, Tom Lane <> 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


pgsql-performance by date:

From: david@lang.hm
Date:
Subject: Re: Transparent table partitioning in future version of PG?
From: Rohan Pethkar
Date:
Subject: Rohan Pethkar sent you a Friend Request on Yaari