Is there any significant performance difference when joining tables across different databases on the same server?

This is very easy to test yourself. For example, make a test copy of one of your databases. Then create a query that JOINs two tables from within the same database. Next, create a second JOIN query similar to the first, but modify the second query so that it JOINs a table from the original and test database. Then run both queries and examine their query plans.

In virtually every case, the execution plans are identical, which tells you that performance of the query, whether it is inside a single database, or between two databases on the same server, are more or less identical.

On the other hand, if the databases are on separate servers, performance may suffer greatly due to network latency, etc.


No comments yet... Be the first to leave a reply!