faster joins

  • Thread starter Thread starter SKG
  • Start date Start date
S

SKG

I have two databases with in same sql server.
I want to know whether a join of two tables with in same database is faster
or than
join of tables across two databases

Thanks!!!
 
As long as they are on the same SQL Server, the JOIN would be just as fast.
Distributed queries are expensive.

Kevin
 
SKG said:
Thanks!! Kevin. With in the same server will the query be treated as
distributed query.

No.

In fact you cannot run distributed query even with loopback linked server to
itself.
 
Thanks!!

I did some testing and here is what i found.

In QAnalyser, Query cost is almost same when you are in one of the
databases which involves the join.
But when you are in different database, other then the involved tables,
query cost shoots up dramatically.
 
A Distributed query is a query which involves databases on different
servers.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top