I have 2 tables, detail and product. The detail table could have millions
of rows. The product table could have a few hundred. I need to know which
products are in the detail table. (It would also be nice to know which
products aren't in the detail table). The problem is it has to be fast,
At 12:12 -0600 1/28/02, BD wrote:
I have 2 tables, detail and product. The detail table could have
millions of rows. The product table could have a few hundred. I need
to know which products are in the detail table. (It would also be
nice to know which products aren't in the detail table). The
Would LIMIT work?
select distinct prod_id from products, detail where somedetailwhere
and product.prod_id = detail.prod_id LIMIT 1;
Original Message:
-
From: BD [EMAIL PROTECTED]
Date: Mon, 28 Jan 2002 12:12:48 -0600
To: [EMAIL PROTECTED]
Subject: How to emulate subselect
Oops, I didn't realize that you were looking for more than one product id.
Original Message:
-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Mon, 28 Jan 2002 13:31:37 -0500
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: How to emulate subselect on larger table
At 12:12 PM 28/01/2002 -0600, you wrote:
I have 2 tables, detail and product. The detail table could have millions
of rows. The product table could have a few hundred. I need to know which
products are in the detail table. (It would also be nice to know which
products aren't in the detail