I am having problem updating remote table. It just taking too long. I am new to SQL Server and not sure where to check for bottle necks.
Basically I need to update remote table with values from a local table.
Here is the statement I use:
set a.image_id = b.image_id
,a.image_name = b.image_name
from [rem_srv].DB.Schema.TableA a, #local_temp b
where a.image_id = b.image_id
and a.image_name = b.image_name
I even tried and rewrote my query into a cursor to update values one-by-one, but ... had to kill it after 10 min.
I am talking about 850 rows!
Where do I start looking? Can I rewrite my query? Can I use hint (hate it , but ...)?
It is a bit urgent and any help is appreciated.