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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query Oracle Linked Server

Author  Topic 

infodemers
Posting Yak Master

183 Posts

Posted - 2013-07-08 : 13:24:40
I run a query using an Oracle Linked Server.

This seems to run forever.
SELECT * FROM LinkedServer..Schema.View WHERE TN= '2034561295'

...and any other field in the where clause work fine.
SELECT * FROM LinkedServer..Schema.View WHERE SPID= '8088'

Weird isn't!

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-08 : 13:43:40
How a query performs depends very much on the filtering conditions, such as you have in the WHERE clause here. It just may be that the first query is taking too long because the where clause is not selective enough. If you have access to te Oracle Server you can run the same query on it directly and see how many rows it returns and how long it takes to see if the problem is replicated there.
Go to Top of Page

infodemers
Posting Yak Master

183 Posts

Posted - 2013-07-08 : 14:07:33
On the Oracle server side, it takes like less than one second..
Go to Top of Page

infodemers
Posting Yak Master

183 Posts

Posted - 2013-07-10 : 10:31:51
I finally decided to give up using a linked server to an Oracle DB since it takes too long to get a result.
I believe it is not the appropriate thing to do when the table in Oracle DB is too huge.
Using a ADO.NET connection type within a Visual Studio ASP.net project, works perfectly fine.

Regards!
Go to Top of Page
   

- Advertisement -