Re: Ambigous Plan - Larger Table on Hash Side
От | Andres Freund |
---|---|
Тема | Re: Ambigous Plan - Larger Table on Hash Side |
Дата | |
Msg-id | 20180312174314.fehtgox5qr4lfqp6@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Ambigous Plan - Larger Table on Hash Side (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Ambigous Plan - Larger Table on Hash Side
|
Список | pgsql-hackers |
On 2018-03-12 12:52:00 -0400, Tom Lane wrote: > 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. Not sure I follow. Unless the values are equivalent (i.e. duplicate key values), why should non-uniformity in key space translate to hash space? And if there's duplicates it shouldn't hurt much either, unless doing a semi/anti-join? All rows are going to be returned and IIRC we quite cheaply continue a bucket scan? Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: