Linked Server Query taking too Long

Last Post 26 Mar 2008 10:03 PM by jxhyao. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

21 Mar 2008 12:21 PM
I have a linked server to another instance on the same sever. When I run a simple delete query to delete from a table on the linked server it takes 30 minutes. I move the table to be on the same instance as I am running the query on and it takes 2 seconds. Does anyone have a clue as why this is happening?
New Member
New Member

26 Mar 2008 10:03 PM
Another way to do is:

exec ('<delete statment>') at <linked_server>

and see how this goes.
New Member
New Member

27 Mar 2008 06:09 AM
Generally running stored procedures on the linked server is the PREFERRED method over direct queries as recommended by Microsoft Corporation.

If you think of it, that makes sense. Your server is a client to the linked server.

Same principal when the client is a VB, sprocs are the best not direct queries.

Another advantage: if network outage occurs, the transacation completes without hanging.

Kalman Toth

Acceptable Use Policy