Re: Comparing two slices within one table efficiently - Mailing list pgsql-sql

From Ken Simpson
Subject Re: Comparing two slices within one table efficiently
Date
Msg-id 20070813194234.GC30009@pico
Whole thread Raw
In response to Re: Comparing two slices within one table efficiently  ("Christian Kindler" <christian.kindler@gmx.net>)
List pgsql-sql
-----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-----


pgsql-sql by date:

Previous
From: Bryce Nesbitt
Date:
Subject: Getting pk of the most recent row, in a group by
Next
From: "Rodrigo De León"
Date:
Subject: Re: Getting pk of the most recent row, in a group by