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. Lagnada||Date: 2000-04-11 19:41:27|
|Subject: DBD::ODBC for Linux|
|Previous:||From: Grembowicz, Kenneth||Date: 2000-04-11 18:07:08|
|Subject: Subqueries using IN|