all groups > sql server programming > november 2007 >
You're in the

sql server programming

group:

Cross DB Joins


Cross DB Joins obelix via SQLMonster.com
11/2/2007 8:30:03 AM
sql server programming:
I am doing a lookup on one DB to compare the results with a result set from
another DB. I've implemented this look up via a View. The quiery doing the
comparison is taking quite a while to run. I've got some constraints in that
I cannot have these sitting on the same DB and I may not index the view.

My question is:
In a cross-DB join does it matter where source data is called (i.e Look up
data) i.e
A.COMPAREFIELD INNER JOIN [B].[OWNER].LOOKUP_FIELD or B.LOOKUP_FIELD INNER
JOIN [A].[OWNER].COMPAREFIELD

--
obelix

"Whether you think you can or you think you cant you are right" .... Anon

Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200711/1
Re: Cross DB Joins Roy Harvey (SQL Server MVP)
11/2/2007 8:40:40 AM
The order of an INNER JOIN makes no difference.

One thing to double check is that the data types match. Differences
in data types can prevent the use of an index - assuming there is a
useable index in the first place.

Roy Harvey
Beacon Falls, CT


On Fri, 02 Nov 2007 08:30:03 GMT, "obelix via SQLMonster.com"
[quoted text, click to view]
AddThis Social Bookmark Button