SQL Server Performance

Queries which join across diff databases

Discussion in 'Performance Tuning for DBAs' started by Chappy, Jan 13, 2003.

  1. Chappy New Member

    I have the option to create a new database for a bunch of tables I need, which Id prefer from an admin point of view (theyre accessed by people outside the company and so setting up roles for them will be simpler).

    However, these tables often need to be joined to tables in another database, and I wonder if im right in thinking there is no performance issues with this.

    Checking the execution plans (joining two tables in same DB, and then joining identical tables with one in diff database), the execution plans seem pretty much the same.

    Can anyone think of a reason why I shouldnt do this? Im assuming the buffer cache will not be affected (ie, SQL does not reserve a bit for each database, but caches the most commonly requested data regardless of what database they may reside in).


  2. Chappy New Member

    I forgot to mention, the databases will be on the same server. I am not referring to joining across linked servers.
  3. bradmcgehee New Member

    Query performance should not be affected. You will want to be sure that you use the qualified object name, such as database_name.owner_name.object_name in all of your queries.

    Brad M. McGehee
  4. royv New Member

    If the databases are on the same server, why do you need linked servers? Linked servers are only necessary when databases are on different servers. Follow brad's syntax and you should have no problems.

    "How do you expect to beat me when I am forever?"
  5. Chappy New Member

    Thanks Brad. I expected this to be the case, just wanted a little confirmation.<br /><br />royy, I dont need linked servers <img src='/community/emoticons/emotion-1.gif' alt=':)' /> I was merely clarifying that the databases were on the same server.
  6. royv New Member

    Ooops sorry, didn't read correctly. I guess thats what happens when you are coding and answering posts at the same time..[<img src='/community/emoticons/emotion-1.gif' alt=':)' />]<br /><br /><br />"How do you expect to beat me when I am forever?"

Share This Page