Re: NOT IN doesn't use index? (fwd)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Becky Neville <rebecca(dot)neville(at)yale(dot)edu>
Cc: andrew(at)libertyrms(dot)info, pgsql-performance(at)postgresql(dot)org
Subject: Re: NOT IN doesn't use index? (fwd)
Date: 2003-05-03 18:34:55
Message-ID: 3EB40BCF.9010203@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Becky Neville wrote:
> Here is the EXPLAIN output from the two queries. The first is the one
> that uses WHERE field NOT IN ( 'a','b' etc ). The second is the (much

Unless you are working with Postgres 7.4devel (i.e. cvs HEAD), the IN
construct is notoriously slow in Postgres. In cvs it is vastly improved.

Also, as I mentioned in the other reply, send in "EXPLAIN ANALYZE"
results instead of "EXPLAIN" (and make sure you run "VACUUM ANALYZE" first).

Joe

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Becky Neville 2003-05-03 19:08:03 Re: NOT IN doesn't use index? (fwd)
Previous Message Josh Berkus 2003-05-03 18:34:40 Re: NOT IN doesn't use index? (fwd)