"Michael Richards" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to