0

I have some question regarding SQL Server Database.

I have a old database in working state in which the actual data of Employee exists. I am creating a new database for my application. For this new application I need to depend on data from old database. I am only storing the Employee Id in my new database and fetching the names and other details for display as and when required. I am using join between two databases to fetch employee details Example

JOIN [ASES].[dbo].[USERS] AS USERS
    ON CRMDR.Requester COLLATE SQL_Latin1_General_CP1_CI_AS = USERS.RID COLLATE SQL_Latin1_General_CP1_CI_AS

I am trying to find out the performance difference. This join from two difference database is better or if I copy the Employee details in my new database and then my query will have only single database join? Which one is more better as per performance?

blue
  • 568
  • 3
  • 10
  • 30
  • No difference. See for example: http://dba.stackexchange.com/questions/692/sql-server-2008-cross-database-performance-on-same-physical-machine-and-server – MicSim Feb 13 '13 at 09:38
  • At work we regularly do joins between tables from two different databases on same server and it all works quite fast. Maybe there would be performance penalty if the databases were on different servers (my guess is that in such case optimizer couldn't access the statistics necessary for creation of optimal execution plan). Another important thing could be whether the databases have equal collations and settings... – Ivan Golović Feb 13 '13 at 09:46

0 Answers0