Sample Header Ad - 728x90

Which one is more efficient: select from linked server or insert into linked server?

32 votes
2 answers
65467 views
Suppose I have to export data from one server to another (through linked servers). Which statement will be more efficient? Executing in source server: INSERT INTO [DestinationLinkedServer].[DestinationDB].[dbo].[Table] SELECT a, b, c, ... FROM [dbo].Udf_GetExportData() Or executing in target server: INSERT INTO [dbo].[Table] SELECT a, b, c, ... FROM OPENQUERY([OriginLinkedServer], 'SELECT a, b, c, ... FROM [OriginDB].[dbo].Udf_GetExportData()') Which one will be faster and consume fewer resourcers in total (both source and target server)? Both servers are SQL Server 2005.
Asked by Guillermo Gutiérrez (667 rep)
Jul 12, 2013, 09:51 PM
Last activity: Aug 20, 2024, 01:41 PM