BookmarkSubscribeRSS Feed
jc259star
Calcite | Level 5

Hi ,

I want to extract data from SQL Server. I successfully connect my computer with SQL Server by ODBC .

Then I run proc sql to extract data from one table in SQL Server database:P_2013. The SAS log showed me that it took ~40 min for extracting the data. 

To save time, I run the same SAS program in three computers simultaneously to extract data from other tables of the same database:P_2013.

The SAS log surprisingly showed that it took ~130 min for extracting the data, about three times as one computer . No time was saved at all!

Would you please suggest me how to save time to extract data from the tables of the same database in SQL Server ?

6 REPLIES 6
LinusH
Tourmaline | Level 20

Sounds like you have a constraint outside SAS. To verify use

options fullstimer;

You have no filters? If not, I think that the best way forward is going to your dba/nw/Windows server admins. They should be able to help you find the bottlenecks.

Data never sleeps
jc259star
Calcite | Level 5

Hi Linus,

Thank you very much for your advice. I will go to our Server Admins for more information.

TomKari
Onyx | Level 15

Very likely your bottleneck is your database server, or possibly your networking environment. If your server is running as hard as it can to meet your one request, sending it three requests will stretch out the time for each request. Likewise, if one request fills your network "pipe", sending three times the data through the pipe will take three times as long.

Your database and network administrators should be able to help you determine how heavily loaded the infrastructure is.

Tom

jc259star
Calcite | Level 5

Hi Tom,

Thank you very much for the information.

Jun

morgalr
Obsidian | Level 7

jc,

I can verify what Tom Kari said, being an Oracle Db I see this happen a lot. When the network pipe is full, the network pipe is full, you just have to wait due to bandwidth limitations. If your server is maxing out trying to pull your data, you cannot get more down the pipe, even if it is open, than the server will push.

As stated by others, check with your admins to see if this is the case, but here is an idea to consider: "Can any of your data be considered static?" If it can be, then you should consider storing static portions locally; thus, not having to pull at least part of the data through the network pipe or server. When you need a fresh copy of the data, then delete the dynamic content and only pull data that is not considered static.

You'll need to check with your IT/Security managers to see if storing the data locally is an acceptable option for your location.

jc259star
Calcite | Level 5

Hi Morgalr,

Thank you for the suggestion.

Jun

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1949 views
  • 1 like
  • 4 in conversation