I have this code in a trigger.
if isnull(@d_email,'') <> isnull(@i_email,'')
 begin
 update server2.database2.dbo.Table2
 set
 email = @i_email,
 where user_id = (select user_id from server2.database2.dbo.Table1 where login =  @login)
 end
I would like to update a table on another db server, both are MSSQL. the query above works for me but it is taking over 10 seconds to complete. table2 has over 200k records. When I run the execution plan it says that the remote scan has a 99% cost.
Any help would be appreciated.