Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Linked Server Performance

Author  Topic 

MatthewB
Starting Member

5 Posts

Posted - 2014-01-25 : 10:27:17
I am writing a script to pull daily data from a linked server, and the pulls will be very large. I have read that creating joins from local tables to remote tables will have negative impact on performance.

My question is this; would it be more beneficial to create the joins all on the remote server (so all joined tables are remote and nothing joins to local tables) for data isolation?

Kristen
Test

22859 Posts

Posted - 2014-01-25 : 14:40:02
We usually pull the data into a local #TEMP table and then JON that locally. Normal we use OpenQuery, rather than

SELECT Col1, Col2, ...
FROM RemoteServer.RemoteDatabase.dbo.RemoteTable

because we find OpenQuery performs better. YMMV
Go to Top of Page

MatthewB
Starting Member

5 Posts

Posted - 2014-01-26 : 00:54:23
Thank you. When I attempt to use OpenQuery, I get an error that it can not be packaged. Would this indicate a lack of server access level?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2014-01-26 : 20:15:01
Not seen that one before, can you post the exact error message?
Go to Top of Page
   

- Advertisement -