Cross database queries, joins advantages and disadvantages

前端 未结 2 636
不知归路
不知归路 2021-01-17 16:28

I am in a state of confusion that what are the advantages and disadvantages of using cross database queries within the same SQL Server instance?

One thing I can thin

相关标签:
2条回答
  • 2021-01-17 17:24

    If you will read article here:https://dba.stackexchange.com/questions/692/sql-server-2008-cross-database-performance-on-same-physical-machine-and-server you will realize that you will not have performance penalty because query optimizer will be only one. Difference will be only if you will be use cross-instance queries.In this case, query will be analyzed by separate query analyzers on both instances.

    Possible issues that can be in your case are related to management.Read how to manage cross-database ownership here: http://msdn.microsoft.com/en-us/library/ms188676.aspx

    0 讨论(0)
  • 2021-01-17 17:25

    There is no performance penalty.

    There are issues around

    • security: permissions in each database for the same user
    • data integrity: can't have cross database foreign keys
    0 讨论(0)
提交回复
热议问题