07-27-2015 01:22 PM
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_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_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 ?
07-28-2015 04:38 AM
Sounds like you have a constraint outside SAS. To verify use
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.
07-28-2015 06:00 PM
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.
07-28-2015 07:58 PM
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.