Re: Exclusion List

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Exclusion List
Дата
Msg-id 10129.996682996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Exclusion List  ("Michael Richards" <michael@fastmail.ca>)
Список pgsql-sql
"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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Converting epoch to timestamp?
Следующее
От: "Michael Richards"
Дата:
Сообщение: Re: Exclusion List