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.
No comments:
Post a Comment