My problem is simple:
I run some quite complex query using remote server and while this query runs as a charm ( <0s )
select t1.* from [linkedserver].[db].[dbo].[table1] t1
inner join
[linkedserver].[db].[dbo].[table2] t2
on t1.t2ID = t2.ID
WHERE t2.OtherID = 323207;
this one takes ages ( 34s ):
delete t1 from [linkedserver].[db].[dbo].[table1] t1
inner join
[linkedserver].[db].[dbo].[table2] t2
on t1.t2ID = t2.ID
WHERE t2.OtherID = 323207;
In both cases nothing is selected/deleted.
There are all necessary indexes on both tables (t1 contains approx 6,000,000 entries while t2 has 500,000). Query has been digested for the sake of example. It is not my real query but I was able trace the problem down to this point.