It sounds like you are missing indexes.....
Please post the results of -
SHOW CREATE TABLE ImportLiebermansStep3Add;
- and -
SHOW CREATE TABLE ProductsOld;
- and we can tell you if you have enough indexes or not.
Yours,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Jeff Gannaway
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
hics.com> cc:
Fax to:
07/10/2004 08:18 Subject: Need help with my LEFT JOIN
query...
PM
I'm trying to SELECT a field (ProductID) from 'Table a' WHERE two
corresponding fields are equal (a.PUBLISHER = b.Vendor AND a.NUMBER =
b.VIN)
Table 'a' (approximately 100,000 records):
+================================+
| ImportLiebermansStep3Add |
+================================+
| ProductID | PUBLISHER | NUMBER |
+-----------+-----------+--------+
| ACC_4076 | ACC | 4076 |
| BCD_300 | BCD | 300 |
| DEC_R50 | DEC | R50 |
| WIN_220 | WIN | 220 |
+-----------+-----------+--------+
Table 'b' (approximately 20,000 records):
+================================+
| ProductsOLD |
+================================+
| ProductID | Vendor | VIN |
+-----------+-----------+--------+
| | ACC | 4076 |
| | BCD | 9999 |
| | DEC | R50 |
+-----------+-----------+--------+
Here's my Query....
SELECT a.ProductID FROM ImportLiebermansStep3Add a
LEFT JOIN ProductsOLD b ON a.PUBLISHER=b.Vendor AND a.NUMBER=b.VIN
WHERE b.ProductID IS NULL;
But this query runs, and runs, and runs, and runs, and runs without ever
giving results.
What am I missing???
Thanks!
-Jeff Gannaway
_______________________________________________
http://RadioU.com
This Is Where Music Is Going - Listen Online!
_______________________________________________
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]