Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Yeah, I'm all wet, because you'd still have to re-de-duplicate at the
> end. But then why did the OP get a speedup? *scratches head*
He was reporting that 2 levels of hashing was faster than sort+uniq
(with the sorts swapping to disk, no doubt). One level of hashing
should be faster yet, but maybe not by enough to be obvious as long
as you don't start to swap.
regards, tom lane