Re: Ambigous Plan - Larger Table on Hash Side - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Ambigous Plan - Larger Table on Hash Side
Date
Msg-id 9257.1520873520@sss.pgh.pa.us
Whole thread Raw
In response to Ambigous Plan - Larger Table on Hash Side  (Narendra Pradeep U U <narendra.pradeep@zohocorp.com>)
Responses Re: Ambigous Plan - Larger Table on Hash Side  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Narendra Pradeep U U <narendra.pradeep@zohocorp.com> writes:
>       Recently I came across a case where the planner choose larger table on hash side. I am not sure whether it is
anintended  behavior or we are missing something.  

Probably the reason is that the smaller table has a less uniform
distribution of the hash key.  You don't want to hash with a nonuniform
distribution of the hashtable key; if many keys go into the same bucket
then performance degrades drastically.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cast jsonb to numeric, int, float, bool
Next
From: Mat Arye
Date:
Subject: Additional Statistics Hooks