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 |
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2011-10-18 : 08:31:23
|
| Hi,I produced a execution plan. The problem is, Remote Query Cost is 51% I have a linked Server to Oracle 11g. Any suggestions how can I reduce this cost?Best Regards.I am trying to run a query as follows:Select...FROM [Test]..[Schema].[TableName]INNER JOIN Table2LEFT JOIN Table3... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-18 : 08:53:51
|
| put the oracle results to temporary table, add indexes to columns used for joins and then use it in above query.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2011-10-18 : 09:00:35
|
| Hi visakh16,Do you mean put the Oracle results into SQL Server table? There are primary keys on the tables, do I need extra keys? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-18 : 09:44:10
|
| yep. exactlyif you've pks its fine. if there's any other fields used in where etc consider creating a non clustered index on them too------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|