Re: How to get explain plan to prefer Hash Join

Поиск
Список
Период
Сортировка
От Nicholson, Brad (Toronto, ON, CA)
Тема Re: How to get explain plan to prefer Hash Join
Дата
Msg-id EC55DC235432104F8255702A8D7344D951EEC259@G4W3211.americas.hpqcorp.net
обсуждение исходный текст
Ответ на How to get explain plan to prefer Hash Join  (atxcanadian <matthew.boyda@gmail.com>)
Список pgsql-performance
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-
> owner@postgresql.org] On Behalf Of atxcanadian
> Sent: Wednesday, March 11, 2015 1:01 PM
> To: pgsql-performance@postgresql.org
> Subject: [PERFORM] How to get explain plan to prefer Hash Join
>
> Currently seeing massive increase in performance when optimizer chooses
> Hash Join over Nested Loops. I achieve this by temporarily setting nested loops
> off. I'd like to setup some database variables where the optimizer prefers hash
> joins. Any suggestions?

Try making small adjustments to either random_page_cost or cpu_tuple_cost.  They can influence the planners choice
here. I have solved similar issues in the past by adjusting one or the other.  Be aware thought that those changes can
havenegative effects in other places, so be sure to test. 

Brad.


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: How to get explain plan to prefer Hash Join