Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.


In response to

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group