Hi,
We recently created a new database and moved some of our tables there. Whenever we write a query using tables from both databases, the queries take much longer than if the tables were in the same DB. The databases are both on the same server. Does anyone have any idea what might be happening?
Example: The first one takes a lot longer than the second one, and there is an index on column a in all tables.
SELECT top 10 *
FROM DB1.dbo.Table1
INNER JOIN DB2.dbo.Table2
ON Table1.a = Table2.a
SELECT top 10 *
FROM DB1.dbo.Table1
INNER JOIN DB1.dbo.Table2
ON Table1.a = Table2.a
Any suggestions are much appreciated.
Thank you.