pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: queries with lots of UNIONed relations
Date: Thu, 13 Jan 2011 18:07:25 -0500
Message-ID: <18364.1294960045@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTinXs1v8zPJiL-di7TZok6CNgOfv-Dan8H+Ot2DN@mail.gmail.com>
References: <AANLkTiktjfaR9_sDU+F3UZhAQn7qrBktXE1EiOX=inzQ@mail.gmail.com>
	<19302.1294938802@sss.pgh.pa.us>
	<AANLkTikM9=JXPwYpAbfQ5KZgenWBCn5_J2=W6MRhq0U0@mail.gmail.com>
	<4879.1294949144@sss.pgh.pa.us>
	<AANLkTimx00ADoFDbOyFixLOSy4ypKjhQrHnTzanepbJD@mail.gmail.com>
	<AANLkTikYEX25b4E_AoZk=WWspv2OC7ZKct2VeZb1NCMj@mail.gmail.com>
	<11563.1294957582@sss.pgh.pa.us>
	<AANLkTikH4eyp5JwJpUEkfOX4u2hOemGDCoXPEf01dkAv@mail.gmail.com>
	<AANLkTinXs1v8zPJiL-di7TZok6CNgOfv-Dan8H+Ot2DN@mail.gmail.com>

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



view thread (22+ messages)  latest in thread

Message-ID: <18364.1294960045@sss.pgh.pa.us>
Permalink:  ../18364.1294960045@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18364.1294960045@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, jnelson+pgsql@jamponi.net
  Subject: Re: queries with lots of UNIONed relations
  In-Reply-To: <18364.1294960045@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox