KB: SQL openquery vs linked server
Good read: Openquery vs Linked Server
The linked server query, SQL Server is going to make decisions for you on how it mashes all the data together and returns the result set. By default, when you run a distributed query using a linked server, the query is processed locally. This may or may not be efficient, depending on how much data must be sent from the remote server to the local server for processing. Sometimes it is more efficient to pass through the query so that it is run on the remote server. This way, if the query must process many rows, it can process them on the remote server, and only return to the local server the results of the query. The OPENQUERY function is used to specify that a distributed query be processed on the remote server instead of the local server.
Reference:
Comments
Post a Comment