BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
toshi
Fluorite | Level 6

Can I use oracle DB as a workspace to speed up output rather than using SAS Workspace as it takes more time and size while used in SAS EG? It often takes my worksspace upto 99 %. Is there any query or options in SAS to use ORACLE DB as workspace ?

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@toshi

If you're interfacing with a database and dealing with large datavolumes then the most important thing in regards of performance is to plan/design your processes to limit data movements between the database and your SAS server.

 

In general: Reduce the data volumes which get moved between SAS and the database, i.e. by ensuring that joins between database tables fully execute in the database and when it comes to heterogenous joins between SAS and database tables that you code in a way that the smaller table gets loaded to the server where processing happens (which can be SAS or the database). 

 

And if you're using SAS EG and never disconnect from SAS for hours or even days then it also doesn't hurt if you implement some code which deletes SAS Work tables which you don't need any longer (done via Proc Delete or Proc Datasets/Delete).

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I wouldn't have thought using a third party would be quicker, as you then incur the overheads of both sending data to the DB and retrieving from the DB.

If your process takes up a lot of resources (and you have checked for a good reason), then likely best bet is to speak with IT to get you some more resources.  

Kurt_Bremser
Super User

No, and for a very good reason. SAS writes not only datasets, but all kinds of temporary files to the WORK location. A DBMS could never handle that (it would only be able to deal with tabular data). Aside from that, you would incur (as @RW9 already stated) a massive overhead in network traffic to the DBMS server (unless the DBMS and SAS share the same physical and logical - same VM - server).

 

So you should either unload part of your SAS workload to the DBMS by using explicit SQL pass-through, or get more resources.

Or you find parts of your code that can be improved to be more efficient.

For that, you would have to post the code (along with some example data, if necessary - use a data step) that consumes so much of your resources.

Patrick
Opal | Level 21

@toshi

If you're interfacing with a database and dealing with large datavolumes then the most important thing in regards of performance is to plan/design your processes to limit data movements between the database and your SAS server.

 

In general: Reduce the data volumes which get moved between SAS and the database, i.e. by ensuring that joins between database tables fully execute in the database and when it comes to heterogenous joins between SAS and database tables that you code in a way that the smaller table gets loaded to the server where processing happens (which can be SAS or the database). 

 

And if you're using SAS EG and never disconnect from SAS for hours or even days then it also doesn't hurt if you implement some code which deletes SAS Work tables which you don't need any longer (done via Proc Delete or Proc Datasets/Delete).

toshi
Fluorite | Level 6

Thank You all for your suggestions. I appreciate your valuable time. Smiley Happy

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1449 views
  • 4 likes
  • 4 in conversation