I have a sql script running on a server (ServerA) A linked server (ServerB) is installed on this server - it is located outside the site in the data center.
This query works relatively simple:
SELECT OrderID
FROM [ServerB].[DBName].[dbo].[MyTable]
WHERE Transferred = 0
However, when updating the same table using this query:
UPDATE [ServerB].[DBName].[dbo].[MyTable]
SET Transferred = 1
It takes> 1 minute to complete (even if there is only 1 column where Transferred = 0)
Is there a reason this will act so slowly? Should I have an index in MyTable for the Migrate column?
source
share