[ back to planner stuff after a hiatus ]
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Right, so maybe I wasn't as clear as I could have been in asking the
> question. I do understand how it can be a win to unique B and use it
> as the OUTER relation (jointype JOIN_UNIQUE_OUTER). What I don't
> understand is how it can ever be a win to unique B and use it as the
> INNER relation (jointype JOIN_UNIQUE_INNER).
Hmm, well, maybe B is *really* nonunique and unique'ifying it makes it
small enough to fit in a single-batch hash table?
Also, seriously nonunique RHS data is pretty awful for mergejoining
(too much rescanning) so I could imagine wanting to do it for a
mergejoin too.
regards, tom lane