pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Becky Neville <rebecca.neville@yale.edu>
Cc: andrew@libertyrms.info
Cc: pgsql-performance@postgresql.org
Subject: Re: NOT IN doesn't use index? (fwd)
Date: Sat, 03 May 2003 11:34:55 -0700
Message-ID: <3EB40BCF.9010203@joeconway.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0305031351170.9063-100000@termite.zoo.cs.yale.edu>
References: <Pine.LNX.4.44.0305031351170.9063-100000@termite.zoo.cs.yale.edu>

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




view thread (9+ messages)  latest in thread

Message-ID: <3EB40BCF.9010203@joeconway.com>
Permalink:  ../3EB40BCF.9010203@joeconway.com/
Also on:    postgresql.org/message-id/3EB40BCF.9010203@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: mail@joeconway.com, rebecca.neville@yale.edu, andrew@libertyrms.info
  Subject: Re: NOT IN doesn't use index? (fwd)
  In-Reply-To: <3EB40BCF.9010203@joeconway.com>
  References: <Pine.LNX.4.44.0305031351170.9063-100000@termite.zoo.cs.yale.edu> <3EB40BCF.9010203@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox