"Joshua D. Drake" <jd@commandprompt.com> writes:
> 1. Are the row estimates accurate? If not increase your statistics.
Presumably not, since he'd surely never overflow memory with hashes of
only a few hundred rows.
The hash join code is capable of splitting the table into multiple
segments, but it won't do so unless the planner's estimate of the
table size is larger than sort_mem. So the real problem IMHO is
the bad rowcount estimate.
regards, tom lane