Re: queries with lots of UNIONed relations - Mailing list pgsql-performance

From Tom Lane
Subject Re: queries with lots of UNIONed relations
Date
Msg-id 18364.1294960045@sss.pgh.pa.us
Whole thread Raw
In response to Re: queries with lots of UNIONed relations  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-performance
Robert Haas <robertmhaas@gmail.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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: queries with lots of UNIONed relations
Next
From: Jon Nelson
Date:
Subject: Re: queries with lots of UNIONed relations