optimizing select ... not in (select ...)

Поиск
Список
Период
Сортировка
От Laurent Martelli
Тема optimizing select ... not in (select ...)
Дата
Msg-id 87bslkayl8.fsf@lolo.aopsys
обсуждение исходный текст
Ответы Re: optimizing select ... not in (select ...)  ("Josh Berkus" <josh@agliodbs.com>)
Re: optimizing select ... not in (select ...)  (Tomas Berndtsson <tomas@nocrew.org>)
Re: optimizing select ... not in (select ...)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
I have this query :

select distinct on (Pictures.PictureID) * from Pictures where Pictures.PictureID not in (select distinct PictureID from
Keywords);

and I find it a bit slow. Does anybody have suggestions to run this
faster ? (I have indexes on PictureID on both Pictures and Keywords) 

-- 
Laurent Martelli
laurent@aopsys.com              http://www.bearteam.org/~laurent/


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

Предыдущее
От: Kate Collins
Дата:
Сообщение: Re: prob with PERL/Postgres
Следующее
От: Laurent Martelli
Дата:
Сообщение: Re: Donations?