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