pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Simpson <ksimpson@mailchannels.com>
To: pgsql-sql@postgresql.org
Subject: Re: Comparing two slices within one table efficiently
Date: Mon, 13 Aug 2007 12:42:34 -0700
Message-ID: <20070813194234.GC30009@pico> (raw)
In-Reply-To: <20070813193427.76840@gmx.net>
References: <1694202581-1187027999-cardhu_decombobulator_blackberry.rim.net-401169594-@bxe119.bisx.prod.on.blackberry>
	<46C0B01C.3020307@sprocks.gotdns.com>
	<20070813193427.76840@gmx.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Kindler [13/08/07 21:34 +0200]:
> Yes and you could make it even more speedy with the use table partitioning.
> http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html

Thanks for all your speedy help, everyone. I tried doing a "self join"
and that sped things up enormously (query took on the order of 30
seconds to compare two million-row table slices, resulting in a 20K
row result). I will also try re-ordering the unique constraint to get
speedier indexing out of it and will look at table partitioning.

Regards,
Ken

- -- 
Ken Simpson
CEO, MailChannels

Fax: +1 604 677 6320
Web: http://mailchannels.com
MailChannels - Reliable Email Delivery (tm)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGwLQq2YHPr/ypq5QRApP8AKDfRGqDFkcONh0YaojX7362nXP12gCg3WZ6
k5ZBwcMplXyVkEguQtbgdFU=
=bsyu
-----END PGP SIGNATURE-----



view thread (6+ messages)

Message-ID: <20070813194234.GC30009@pico>
Permalink:  ../20070813194234.GC30009@pico/
Also on:    postgresql.org/message-id/20070813194234.GC30009@pico

 · 

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-sql@postgresql.org
  Cc: ksimpson@mailchannels.com
  Subject: Re: Comparing two slices within one table efficiently
  In-Reply-To: <20070813194234.GC30009@pico>

* 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