>>>Hi
>>>
>>>I am querying data from a linked server in sql management studio and the query is very slow. (in fact I cancelled it after about 30 minutes.)
>>>
>>>But if I log onto the linked server and run the same query in management studio I get a result set (5 records) in about 3 seconds.
>>>
>>>Any idea why or where I should start to look ?
>>>
>>>I'm query data from several servers and do it usually by being logged into one server and accessing all the others as linked servers.
>>>
>>>
>>>Thanks
>>>
>>>Nick
>>
>>How exactly you're executing the code? Are you using OpenQuery?
>
>No I'm not . Should I ?
Try using OpenQuery. I think there is a difference as where the statement is executed. In case of OpenQuery, if I am not mistaken, it executes on the linked server and then results are sent to the calling server.
If it's not broken, fix it until it is.
My Blog