Re: queries with lots of UNIONed relations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: queries with lots of UNIONed relations
Date: 2011-01-13 23:07:25
Message-ID: 18364.1294960045@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Nelson 2011-01-13 23:14:04 Re: queries with lots of UNIONed relations
Previous Message Tom Lane 2011-01-13 23:05:04 Re: queries with lots of UNIONed relations