Re: Cost Issue - How do I force a Hash Join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cost Issue - How do I force a Hash Join
Дата
Msg-id 4360.1140500155@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cost Issue - How do I force a Hash Join  ("Virag Saksena" <virag@auptyma.com>)
Ответы Re: Cost Issue - How do I force a Hash Join  ("Craig A. James" <cjames@modgraph-usa.com>)
Список pgsql-performance
"Virag Saksena" <virag@auptyma.com> writes:
> The individual queries run in 50-300 ms. However the optimizer is =
> choosing a nested loop to join them rather than a Hash join
> causing the complete query to take 500+ seconds. It expects that it will =
> get 1 row out from each of the sources, but here is gets
> several thousand rows.

The best approach is to see if you can't fix that estimation error.
Are the stats up to date on these tables?  If so, maybe raising the
statistics targets would help.

            regards, tom lane

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

Предыдущее
От: "Virag Saksena"
Дата:
Сообщение: Cost Issue - How do I force a Hash Join
Следующее
От: "Craig A. James"
Дата:
Сообщение: Re: Cost Issue - How do I force a Hash Join