From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Richards <michael@fastmail.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Exclusion List
Date: Wed, 01 Aug 2001 12:23:16 -0400
Message-ID: <10129.996682996@sss.pgh.pa.us> (raw)
In-Reply-To: <3B68202C.0001A3.93146@frodo.searchcanada.ca>
References: <3B68202C.0001A3.93146@frodo.searchcanada.ca>
"Michael Richards" <michael@fastmail.ca> writes:
> The reduction of the list doesn't seem to be terribly efficient. Here
> are some strategies I've been looking at:
> select id from users WHERE
> id not in (select userid from sentletters where lettertype=1) AND
> aclgroup IN (1,2);
Try an EXCEPT, along the lines of
(select id from users where conditions) except
(select userid from sentletters where other-conditions);
regards, tom lane
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: tgl@sss.pgh.pa.us, michael@fastmail.ca
Subject: Re: Exclusion List
In-Reply-To: <10129.996682996@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