Re: Subqueries using IN

From: <kaiq(at)realtyideas(dot)com>
To: "Grembowicz, Kenneth" <GrembowiczK(at)NAVO(dot)NAVY(dot)MIL>
Cc: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Subqueries using IN
Date: 2000-04-11 19:28:16
Message-ID: Pine.LNX.4.10.10004111426480.15163-100000@picasso.realtyideas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 11 Apr 2000, Grembowicz, Kenneth wrote:

> I have a database with approximately 2 millions rows. I have constructed a
> select statement with one subquery and it is EXTREMELY slow. If the
> conditions return on record, it takes almost 5 minutes. Practical usage
> returns a couple thousand records, but as you would guess I can't wait
> days....ANY SUGGESTIONS??????????????
use "exists", instead of in clause. see the archive of this list, there
are plenty of examples.

Kai

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Antonio W. Lagnada 2000-04-11 19:41:27 DBD::ODBC for Linux
Previous Message Grembowicz, Kenneth 2000-04-11 18:07:08 Subqueries using IN