pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Clinton Adams <clinton@vote-smart.org>
To: Laurette Cisneros <laurette@nextbus.com>
To: pgsql-sql@postgresql.org
Subject: Re: efficient query help
Date: Mon, 22 Apr 2002 17:23:58 -0400
Message-ID: <200204221723.58261.clinton@vote-smart.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0204221110140.22730-100000@visor.corp.nextbus.com>
References: <Pine.LNX.4.44.0204221110140.22730-100000@visor.corp.nextbus.com>


> I have crafted the following query which returns the results I want but
> runs extremely slow (I'm sure it's the "not in" part that does it) since
> the tables can contain large amounts of data.
>
> Is there a better, more efficient way to build this query?

Why not try NOT EXISTS? I find that NOT IN bogs down on even simple queries.



view thread (4+ messages)  latest in thread

Message-ID: <200204221723.58261.clinton@vote-smart.org>
Permalink:  ../200204221723.58261.clinton@vote-smart.org/
Also on:    postgresql.org/message-id/200204221723.58261.clinton@vote-smart.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: clinton@vote-smart.org, laurette@nextbus.com
  Subject: Re: efficient query help
  In-Reply-To: <200204221723.58261.clinton@vote-smart.org>

* 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