Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2007, 06:42 AM
Registered User
 
Join Date: May 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default OPENQUERY vs EXECUTE on a linked server?

Can anyone tell me, if, generally, the performance or the cost of executing a pass-through command on a linked server in SQL Server
2005 would be better using OPENQUERY or the new option with EXECUTE -- whether the two servers are on the same box or not? I haven't

been able to find a comparison between the two?

Have there been any tests of the difference?

What effect on performance is there with 'rpc out' set with sp_serveroption so EXECUTE can be used?

To be more specific I have a development box with SQL Server 2005 and Oracle 9.2.

The new option with EXECUTE would be something like the example in MSDN (Example J.) at:

http://msdn2.microsoft.com/en-us/library/ms188332.aspx


EXEC ( 'SELECT * FROM scott.emp') AT ORACLE;
GO
 
Old May 28th, 2007, 06:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not very sure though, just a thought.

You can make both the queries and check out in query analyser for cost of the query and find which is better than the other.

IMO, as long as the control is within the SQl server the performance matter, but processing query and fetching data from the remote server is all in the hands of remote server and one cannot have control on its performance.

Hope that helps.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Server Question realgone_ SQL Server 2000 4 December 14th, 2005 02:48 PM
Linked server with Identity_insert on b_amit76 SQL Server 2000 2 February 22nd, 2005 12:35 PM
Linked Server w/ VFPOLEDB pjconrad SQL Server 2000 2 November 17th, 2004 07:27 PM
linked server ginoitalo SQL Server 2000 2 September 30th, 2004 08:16 AM
Update - Linked Server venkatpala SQL Server 2000 3 August 25th, 2003 11:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.