"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Note the time for the hash join step:
Have you ANALYZEd these tables lately?
It looks to me like it's hashing on some column that has only a small
number of distinct values, so that the hash doesn't actually help to
avoid comparisons. The planner should know better than to choose such
a plan, but if it's working with obsolete stats ...
regards, tom lane