Re: efficient query help - Mailing list pgsql-sql

From Clinton Adams
Subject Re: efficient query help
Date
Msg-id 200204221723.58261.clinton@vote-smart.org
Whole thread Raw
In response to efficient query help  (Laurette Cisneros <laurette@nextbus.com>)
List pgsql-sql
> 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.


pgsql-sql by date:

Previous
From: Laurette Cisneros
Date:
Subject: efficient query help
Next
From: Ian Morgan
Date:
Subject: How to discover foreign keys (without pulling hair out)