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

Hi All,

Can anybody describe how to improve the efficiency and performance strategies in sas.

Regards

-Andy

1 ACCEPTED SOLUTION

Accepted Solutions
umashankersaini
Quartz | Level 8

Efficiency and performance strategies can classified into five stages:

1. CPU time           2. Data Storage          3.Elapsed time          4. I/O           5. Memory

               1.          CPU Time

A. Use Keep= and Drop= data set options to retain desired variable.

B.Create and use indexes with large data sets.

C. Utilize macro for redundant code.

D.Use IF/Then - else statement to process data.

E.Use the data sets procedure copy statement to copy data sets with indexes.

F. Use SQL procedures to consolidate the number of steps.

G.Turn off macro facility when not needed.

H.Avoid unnecessary sorting - Plan for its use.

I.Use procedures that support CLASS statement.

J.Use the stored program facility for complex data steps.

                    2.               Data Storage

A. Use Length statements to reduce variable size.

B.Create character variable as much as possible.

C.Use _Null_ steps for processing null data sets.

                    3.               I/O

A.Read only data, that is needed.

B.Use "Where" Statements to subset data.

C.Use data compression for large data set.

D. Store data in SAS Data sets, not external files.

E.Perform data subsets early and at same time.

                    4.                Programming time (Elapsed time)

A. Use procedures whenever possible.

B. Document programs and routines with comments.

C. Code for unknown data values.

D. Assign descriptive and meaningful variable names

for memory go with some options like sort size, buff size, mem size and Real Mem Size........

Regards

Uma Shanker Saini

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

Can you be a bit more specific? There are hundreds of things to look at depending of the situation, requirements, environment, budget etc...

Data never sleeps
umashankersaini
Quartz | Level 8

Efficiency and performance strategies can classified into five stages:

1. CPU time           2. Data Storage          3.Elapsed time          4. I/O           5. Memory

               1.          CPU Time

A. Use Keep= and Drop= data set options to retain desired variable.

B.Create and use indexes with large data sets.

C. Utilize macro for redundant code.

D.Use IF/Then - else statement to process data.

E.Use the data sets procedure copy statement to copy data sets with indexes.

F. Use SQL procedures to consolidate the number of steps.

G.Turn off macro facility when not needed.

H.Avoid unnecessary sorting - Plan for its use.

I.Use procedures that support CLASS statement.

J.Use the stored program facility for complex data steps.

                    2.               Data Storage

A. Use Length statements to reduce variable size.

B.Create character variable as much as possible.

C.Use _Null_ steps for processing null data sets.

                    3.               I/O

A.Read only data, that is needed.

B.Use "Where" Statements to subset data.

C.Use data compression for large data set.

D. Store data in SAS Data sets, not external files.

E.Perform data subsets early and at same time.

                    4.                Programming time (Elapsed time)

A. Use procedures whenever possible.

B. Document programs and routines with comments.

C. Code for unknown data values.

D. Assign descriptive and meaningful variable names

for memory go with some options like sort size, buff size, mem size and Real Mem Size........

Regards

Uma Shanker Saini

CharlotteCain
Quartz | Level 8

Nice effort, very useful.

umashankersaini
Quartz | Level 8

CharlotteCain : Thank you for your appreciation....

Anand : i am looking for some information related to Memory option ( sort size, buff size , mem size .....) from your side.....

Regards

Uma Shanker Saini

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 839 views
  • 3 likes
  • 4 in conversation