October 14, 2009 at 2:59 am
Hi there,
I've two SQL Server 2005 connected via Linked Server. On Server A I have a view ViewA, on Server B I want to create a view ViewB on View A. So I created the view by
create view ViewB as
select col1, col2 from LinkedServerA.MyDB.dbo.ViewA
If I query ViewB by
select col1 from ViewB where col2=123
it takes 20 secondes until I get a result.
If I query ViewA directly from SSMS connected to ServerB by
select col1 from LinkedServerA.MyDB.dbo.ViewA where col2=123
it takes no second to get the result.
Any Ideas?
regards
Tobias
October 14, 2009 at 4:02 am
If I run the query from ssms the actual execution plan shows a remote query with actual number of rows = 1.
If i run the query against the above mentoined view the actual execution plan shows a remote query with actual number of rows ~ 3.500.000.
If i run the query against the above mentoined view, but this time the view is created with openquery, the actual execution plan shows a remote scan with actual number of rows ~ 3.500.000.
regards
Tobias
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply