Re: Selection of join algorithm.

Поиск
Список
Период
Сортировка
От Atri Sharma
Тема Re: Selection of join algorithm.
Дата
Msg-id CAOeZVidUOpeyerNc3U2qDdOCiRqW_zSTVUoQfqt+ypRCHMRACw@mail.gmail.com
обсуждение исходный текст
Ответ на Selection of join algorithm.  (Ishaya Bhatt <ishayabhatt@gmail.com>)
Список pgsql-hackers


On Saturday, March 8, 2014, Ishaya Bhatt <ishayabhatt@gmail.com> wrote:
Hi,

I am trying to analyze join performance. But I see that even for a table having 100,000 rows and join attribute as primary key, postgres always performs hash join.

Can anyone please tell me under which conditions merge join or nested loop join is invoked?



Nested loop is generally performed when one of the tables being joined is small so the inner loop will be fast.

Hash joins are the preferred join types unless the hash table does not fit in work_mem.if that is the case,then some other join algorithm is preferred.

Regards,

Atri 


--
Regards,
 
Atri
l'apprenant

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

Предыдущее
От: Patrick Curran
Дата:
Сообщение: Re: Static Code Analysis Exploits.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Shave a few instructions from child-process startup sequence