Search

onze sponsors

microsoft_logo.gif


 

computrain_logo.JPG

Forum Login | Register
   Forum

 

Subject: index scan via linked server
Prev Next
You are not authorized to post a reply.

Author Messages
Bas van HeusenUser is Offline

Posts:1

09-10-2007 17:21:17 Alert 

On SQL Server 2000 I have the following table : 

   create table person (id int not null, PRIMARY KEY CLUSTERED (id)).


On Sybase 12.5.1 I have an other table named naw which contains over 4 million rows. It's primary key is defined as naw_id int not null.

Now I want to start a query from SQL Server which gives me all the rows of naw that matches naw_id = persoon.id (prox. 1000 rows). Therefor I created an linked server SYB_SHADOW to my Sybase server with the OLE DB Driver for ODBC from Microsoft.  

I succeeded in querying the Sybase data from SQL Server but I'm looking for a method which joins both tables using an index scan on table naw.

Is this possible? This is my query:

set ansi_nulls on
s
et ansi_warnings on
go

select
from persoon inner join openquery (SYB_SCHADOW, 'select naw_id from naw') AS N on persoon.naw_id = N.naw_id
go

set ansi_nulls off
set ansi_warnings off
go

Can anybody help me out?
You are not authorized to post a reply.
Forums > Forums > DBA > index scan via linked server



ActiveForums 3.6
  
Copyright (c) 2012 PASS Nederland   Privacy Statement  Terms Of Use