Re: Bad Plan for Questionnaire-Type Query

Список
Период
Сортировка
От Tom Lane
Тема Re: Bad Plan for Questionnaire-Type Query
Дата
Msg-id 25886.1241728303@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bad Plan for Questionnaire-Type Query  (David Blewett)
Ответы Re: Bad Plan for Questionnaire-Type Query  (David Blewett)
Список pgsql-performance
Дерево обсуждения
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 12:53 PM, David Blewett <> wrote:
>> 1. http://dpaste.com/hold/41842/
>> 2. http://explain.depesz.com/s/Wg
>> 3. http://explain.depesz.com/s/1s
>> 4. http://dpaste.com/hold/41846/

> Forgot to mention that I'm using Postgres 8.3.6 on linux 2.6.24.

Well, the reason it likes the nestloop plan is the estimate of just one
row out of the lower joins --- that case is pretty much always going to
favor a nestloop over other kinds of joins.  If it were estimating even
as few as ten rows out, it'd likely switch to a different plan.  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.

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Transparent table partitioning in future version of PG?
Следующее
От: david@lang.hm
Дата:
Сообщение: Re: Transparent table partitioning in future version of PG?