Re: How can I make PostgreSQL to select another quey plan?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How can I make PostgreSQL to select another quey plan?
Дата
Msg-id 12839.1322670219@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How can I make PostgreSQL to select another quey plan?  (Yangyang <yangyangbm@gmail.com>)
Ответы Re: How can I make PostgreSQL to select another quey plan?  (Yangyang <yangyangbm@gmail.com>)
Список pgsql-novice
Yangyang <yangyangbm@gmail.com> writes:
> If I don't change the database structures (like index), and only
> modify "Planner cost constants", is it possible to make DB change the
> query plan?

Yes, but usually these don't have huge impacts on estimated costs,
so you will only be able to get it to switch to plans that (it thinks)
are relatively close in cost anyway.

A bigger question is what sort of plan you think would be better, and
whether the planner is even capable of building that plan from the
given query.  You didn't show the particular query you're concerned
about, but I gather from the EXPLAIN output that it involves
sub-selects, and those can act as optimization fences ...

            regards, tom lane

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

Предыдущее
От: Yangyang
Дата:
Сообщение: Re: How can I make PostgreSQL to select another quey plan?
Следующее
От: Yangyang
Дата:
Сообщение: Re: How can I make PostgreSQL to select another quey plan?