Thread: Subqueries using IN
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?????????????? Kenny G. ______________________________________________________ Kenneth P. Grembowicz Oceanographic Databases Division, Code N51 Naval Oceanographic Office 1002 Balch Blvd. Stennis Space Center, MS 39522-5001 Tel: (228) 688-5675 Fax: (228) 688-5778 e-mail: grembowiczk@navo.navy.mil
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