I had posted a message earlier this week about my 'Left Join' taking too
long to run.  This seems to be happening on all of my queries that have
a 'Left Join'.  Does anyone have any suggestions on why this would
happen?  
 
Here is one query which took 45.72 sec to run:
 
SELECT Products.NSIPartNumber, Products.Cost AS Cost, If(Bom.ProductID
Is Not Null,"x","") AS BOM, Products.lngLaborHrs AS LaborHrs,
Products.ModelNo, Products.USPrice AS USPrice, Products.VendorPart,
Products.Description, Products.ProductID, Null AS SumOfQty,
Products.Obsolete FROM Products LEFT JOIN BOM ON Products.ProductID =
BOM.ProductID GROUP BY Products.NSIPartNumber, Products.Cost,
If(Bom.ProductID Is Not Null,"x",""), Products.lngLaborHrs,
Products.ModelNo, Products.USPrice, Products.VendorPart,
Products.Description, Products.ProductID, Products.Obsolete Having
((NSIPartNumber Like "%02-001%") AND (Obsolete<>-1))  ORDER BY
NSIPartNumber;
 
 
Here is the results when I use Explain.  I don't really know how to
read this.
+--------+-------------+--------+--------+---------------+--------+---------+--------+--------+--------+
| id     | select_type | table  | type   | possible_keys | key    |
key_len | ref    | rows   | Extra  |
+--------+-------------+--------+--------+---------------+--------+---------+--------+--------+--------+
| 1      | SIMPLE      | Products| ALL    | [NULL]        | [NULL] |
[NULL]  | [NULL] | 6852   | Using temporary; Using filesort|
| 1      | SIMPLE      | BOM    | ALL    | [NULL]        | [NULL] |
[NULL]  | [NULL] | 5995   |        |
+--------+-------------+--------+--------+---------------+--------+---------+--------+--------+--------+

Any help is appreciated.
 
Jacque
 
 

Reply via email to