Solved

Returning Large dataset from Oracle to SAS

Posted on 2013-06-21
5
606 Views
Last Modified: 2013-06-27
We have a query which runs on a SAS server and connects to an Oracle database.  The query is using sql-pass through and returns 20M rows.  Query ran for 10 hours and never returned anything.
proc sql;
  create temptbl as
  select * from sales where taxable = 'Y';
If we limit the rows, ie inobs=1000000, then we get a return dataset in 15 min.

Same query connecting to the same database but run on another, identical server returns dataset in 3 minutes.  Note:  we need all 20M rows.

We have validated server configuration, network traffic, nic card setting, database utilization are all the same between the two servers.  Two servers are on the same backbone and mounted on the same rack.  Evaluated each component in the stack (session, transport, network, etc) and have narrowed it down to the data after returning to the SAS server.

Any suggestions where to look?
0
Comment
Question by:slim7
  • 2
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 150 total points
ID: 39268790
There must still be a difference between the two servers which you have not detected.

1) Do you run the query on the other server also through "SAS"?
2) Do you create a file on the second server (the 3 min) or just return the data?

The bottleneck(s) I experienced in my SAS (dinosaur) days were: a) the creation of local files, 2) sort operations.

But with the minimal information you provided, this may be just speculation.
:p
0
 

Author Comment

by:slim7
ID: 39268949
We have run the query thru SAS and subsequently using ora sqlplus on the server.  sqlplus also returned the data very slow.  

To answer #2, we run the identical create table query on both servers.
Thanks
0
 
LVL 5

Assisted Solution

by:truinx
truinx earned 150 total points
ID: 39271911
Enable tracing and see the statistics behind the creation?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39272080
Also, check out that OPTIMIZER_MODE is set to FIRST ROWS
0
 

Author Comment

by:slim7
ID: 39282271
Thanks all.  We had ruled out oracle from the equation and focused on the NIC setting.  Issue resolved, there is a bug in the ethernet driver. https://access.redhat.com/site/solutions/20278
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now