I am trying to figure out a way to speed up this query...as is it takes about 40 minutes.
Inserts new rows not existing in a table of a linked server.
INSERT INTO [remote.server.com].[DB].dbo.Table1( Id , Barcode , Name , Address , Address2 , City , State , Zip , Date , Text1 , Text2 , Text3 , Text4 , Text5 , Text6 , Text7 , Text8 , Text9 , Text10 )
SELECT s.Id , s.Barcode , s.Name , s.Address , s.Address2 , s.City , s.State , s.Zip , s.Date , s.Text1 , s.Text2 , s.Text3 , s.Text4 , s.Text5 , s.Text6 , s.Text7 , s.Text8 , s.Text9 , s.Text10
FROM LocalTable1 AS s LEFT OUTER JOIN [remote.server.com].[DB].dbo.Table1 AS d ON s.Id = d.Id AND s.Barcode = d.Barcode
WHERE d.Id IS NULL;
Any ideas? Thanks for the help.