OPENQUERY () slow from linked server, if run from PL/SQL Developer significantly faster...ideas?

Hello, I have a linked server to Oracle.  If I run a SELECT statement using OPENQUERY, it takes 20 mintues to return 8000 records.

BUT If I run the same SELECT statement in PL/SQL Developer, it takes less than a minute.  

I need to 'speed up' the query as currrently (the 8k records) is only 1 day's worth of data and I need to do a 3 year date range.

Code below...I've abbreviated it a bit, I have several fields coming from each table (rgv and nmv).  They are each views in the oracle db - I've tried dissecting the views and pulling directly from tables to no avail, same speed issue.

SET @strsql = '
SELECT * INTO datABC
FROM OPENQUERY(ORACLE_SVR,
''SELECT rgv.field1, rgv.field2, rgv.field3 etc, nmv.field1, nmv.field2, nmv.field3 etc
FROM ORACLEVIEW1 rgv, ORACLEVIEW2 nmv
WHERE rgv.field1 = nmv.field1
AND rgv.date1 >= '''''+convert(char(11),@BeginDate,13)+'''''
AND rgv.date2 <= '''''+convert(char(11),@EndDate,13)+'''''
'')'
EXEC (@strsql)

--SELECT * FROM datABC
LVL 1
angelnjjAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Som TripathiDatabase AdministratorCommented:
You should use SSIS to copy data from Oracle if you have to work on a large volume of data.

1. Use SSIS to copy table using the same query to a staging table.
2. Use the staging table for your further processing.

Linked server can not be preferred when you are working for a large volume of data. Since it uses MSDTC, it consumes your host's physical memory apart from memory utilized by SQL Server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
angelnjjAuthor Commented:
Thanks...I've got experience doing that, and will try in this scenario - I just didn't want to recreate the wheel...thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.