R
Ron Hinds
I have the following SQL statement. It runs *very* slow, we're talking 5
minutes or more. TblInventory has a little over 21,000 rows and
tblVendorQuote has over 25,000 rows. I'm hoping someone has a suggestion on
how to improve the performance of this statement.
strSQL = "INSERT INTO tblVendorQuote ( quoPartnumber, quoVendorID, quoPrice,
quoCurrent, quoVendorPartnumber )" _
& " SELECT TblInventory.invItemID, '1' AS Expr1, 0 AS Expr2, True AS
Expr3, TblInventory.invItemID" _
& " FROM TblInventory" _
& " WHERE TblInventory.invItemID NOT IN (SELECT quoPartNumber FROM
tblVendorQuote WHERE quoVendorID='1')"
db.Execute strSQL
minutes or more. TblInventory has a little over 21,000 rows and
tblVendorQuote has over 25,000 rows. I'm hoping someone has a suggestion on
how to improve the performance of this statement.
strSQL = "INSERT INTO tblVendorQuote ( quoPartnumber, quoVendorID, quoPrice,
quoCurrent, quoVendorPartnumber )" _
& " SELECT TblInventory.invItemID, '1' AS Expr1, 0 AS Expr2, True AS
Expr3, TblInventory.invItemID" _
& " FROM TblInventory" _
& " WHERE TblInventory.invItemID NOT IN (SELECT quoPartNumber FROM
tblVendorQuote WHERE quoVendorID='1')"
db.Execute strSQL