Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query performance problems

Status
Not open for further replies.

rogerl101

IS-IT--Management
Jan 24, 2003
25
US
Hello,

I am running across performance problems with queries that reference tables in separate SQL databases.

I am using SQL7 with five databases on a single machine. The databases merge with other external databases from time to time, and the table structures are identical in each database. For example, Machine1 merges with Database1 on the local server, Machine2 merges with Database2, etc.

When I tested the queries, all of the tables were in a single database and the speed was great.


Query 1 - "Select * From Table1_1"
Query 2 - "Select * From Table1_2"
and so on.

Now I am trying to pull the same data from different databases and the performance has decreased dramatically (1 second query now takes 15 seconds). The queries now look like this.

Query 1 - "Select Database1.dbo.Table1"
Query 2 - "Select Database2.dbo.Table1"
and so on.

Is there something wrong with referencing the tables in this manner? I have looked through everything that I can find, and this seems to be the way to do this.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top