Re: efficient query help

From: Clinton Adams <clinton(at)vote-smart(dot)org>
To: Laurette Cisneros <laurette(at)nextbus(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: efficient query help
Date: 2002-04-22 21:23:58
Message-ID: 200204221723.58261.clinton@vote-smart.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ian Morgan 2002-04-23 06:54:31 How to discover foreign keys (without pulling hair out)
Previous Message Ruben Vivas 2002-04-22 20:05:07 calling a pl/pgsql function with array in argument