Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kjk_kjp
Starting Member
18 Posts |
Posted - 2010-05-18 : 10:46:14
|
| I have the following query - it runs, but the performance is terrible (takes a couple of minutes to run)Table SECTIONS is on a remote serverTable MeetingInfo is on my local server/databaseSELECT a.SYNONYM, b.LOCATIONFROM [RemoteServer].[DatabaseName].[dbo].[SECTIONS] a, [dbo].[MeetingInfo] bWHERE a.ID = b.IDI have tried the following, but I get an error (Invalid Object Name 'MeetingInfo')EXEC('SELECT a.SYNONYM, b.LOCATIONFROM [DatabaseName].[dbo].[SECTIONS] a, [dbo].[MeetingInfo] bWHERE a.ID = b.ID') AT RemoteServerAny ideas? |
|
|
Berend
Starting Member
2 Posts |
Posted - 2010-05-19 : 05:05:31
|
| Depending on your situation there are some options, some not so nice..Your main problem is reading all he records on the remote server.If you can limit the data you want to see on the remote databasecreate a view that makes these limitations first (like: only records in this year) this will increase speed as it forces the where clause to be executed remotly firstWorkaround 1 :Use replication to replicate the remote table to your localdatabaseyou can now query the data locallyWorkaround 2 :Use a maintenance plan to copy the new entry's from the remote table every night in to a local tableunion this with a view limited to the records for today on the remote table and join on it. This will reduce data transfer to the newest records only. |
 |
|
|
|
|
|