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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 probelem in performance at linking server query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-15 : 07:32:02
shidiq writes "I have server named 'A' and 'B', and I have created linkserver in server A : 'linkToB' and in server B : 'linkToA'
when i retrive data in server A with this statement :

declare @orderid int
set @OrderID=10259
SELECT * FROM linkToB.Northwind.dbo.[order details] WHERE OrderID=@OrderID

result for execution plan :

select <-- Filter <-- Remote Query
cost 0% cost 0% 100%
rowcount 2 rowcount 2 rowcount 2155

but when i retrive data without declaration variable

SELECT * FROM linkToB.Northwind.dbo.[order details] WHERE OrderID=10259

result for execution plan :

select <-- Remote Query
cost 0% cost 100%
rowcount 2 rowcount 2

this problem makes longger time to retrive data
is there anyone can help my problem ??"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-08-15 : 12:28:07
Is there a 'conversion' going on here?
Is the "OrderID" column defined as an integer?
Go to Top of Page
   

- Advertisement -