I'm running an update query in SQL 7 from QA, and it runs forever. Has been
running for 20 minutes so far! The query is quite simple: update a single
field in a table, based on a join with another table. There are a total of
1200 rows that are affected (out of a total of 60,000 in the table). Should
not take 20 minutes! Also, retrieving the 1200 rows using the same criteria
is instantaneous.
Anyone have any idea what's going on? Here's my SQL:
UPDATE INVTRY
SET Web = 'REVIEW'
FROM INVTRY INNER JOIN tabStatus
ON INVTRY.Status = tabStatus.Statu s
WHERE INVTRY.Web = 'NEW'
AND tabStatus.ForWe b = 1
AND INVTRY.PRICE <0
AND Invtry.HoldInit IS NULL
running for 20 minutes so far! The query is quite simple: update a single
field in a table, based on a join with another table. There are a total of
1200 rows that are affected (out of a total of 60,000 in the table). Should
not take 20 minutes! Also, retrieving the 1200 rows using the same criteria
is instantaneous.
Anyone have any idea what's going on? Here's my SQL:
UPDATE INVTRY
SET Web = 'REVIEW'
FROM INVTRY INNER JOIN tabStatus
ON INVTRY.Status = tabStatus.Statu s
WHERE INVTRY.Web = 'NEW'
AND tabStatus.ForWe b = 1
AND INVTRY.PRICE <0
AND Invtry.HoldInit IS NULL
Comment