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 14578.1520878011@sss.pgh.pa.us
Whole thread Raw
In response to Re: Ambigous Plan - Larger Table on Hash Side  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> 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?

Duplicates are exactly the problem.  See estimate_hash_bucket_stats.

> 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?

If the bucket containing the MCV is bigger than work_mem, you gotta
problem --- one not necessarily shared by the other relation.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CURRENT OF causes an error when IndexOnlyScan is used
Next
From: David Steele
Date:
Subject: Re: PATCH: Unlogged tables re-initialization tests