Re: how to help the planner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to help the planner
Дата
Msg-id 868.1364487526@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to help the planner  (Marty Frasier <m.frasier@escmatrix.com>)
Ответы Re: how to help the planner  (Marty Frasier <m.frasier@escmatrix.com>)
Список pgsql-performance
Marty Frasier <m.frasier@escmatrix.com> writes:
> We've been using postgreSQL for a few years.  This is my first post here
> and first real dive into query plans.

One quick thought is that it's probably worth cranking up
join_collapse_limit and/or from_collapse_limit, since the number of
relations in the query is considerably more than the default values of
those limits.  This will make planning take longer but possibly find
better plans.  I'm not sure it will help a lot, since most of the
problem is evidently bad rowcount estimates, but it might help.

Also it seems like the major rowcount failing is in the estimate for the
t12 subquery.  I can't tell why that particular combination of WHERE
clauses is giving it such a hard time --- is there something odd about
the distribution of 'cahsee_ela' tests?  Why is that particular subquery
grouped over school/student when all the others are grouped over just
student?

            regards, tom lane


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

Предыдущее
От: Marty Frasier
Дата:
Сообщение: how to help the planner
Следующее
От: kelphet xiong
Дата:
Сообщение: Question about postmaster's CPU usage