On 4/3/06, Kai Hessing <kai.hessing@xxxxxxxxxx> wrote: > Marko Kreen wrote: > > Just a shot in the dark: does the plan stay the same, > > when you remove the ' AND status > -1' ? > > No difference: I skipped the 'AND status > -1' and have the following > results... Ok. Thanks. I once had similar query and it seemed that postgres got confused if there was big IN and alse something else in WHERE clause. Dropping the rest got postgres to use index for IN. But I did not have time to research it then and with your result seems it's not a problem in recent versions. -- marko