optimizing select ... not in (select ...) - Mailing list pgsql-sql

From Laurent Martelli
Subject optimizing select ... not in (select ...)
Date
Msg-id 87bslkayl8.fsf@lolo.aopsys
Whole thread Raw
Responses Re: optimizing select ... not in (select ...)
Re: optimizing select ... not in (select ...)
Re: optimizing select ... not in (select ...)
List 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 by date:

Previous
From: Kate Collins
Date:
Subject: Re: prob with PERL/Postgres
Next
From: Laurent Martelli
Date:
Subject: Re: Donations?