BookmarkSubscribeRSS Feed
Marilyn
Calcite | Level 5
2. Use as much criteria as possible in the selection of rows. Every addition to the where clause will shrink the resultant rows.

3. Use correlated queries to combine mulitple years.


I am trying to make my code as efficient as possible since I deal with huge datasets, but I'm new and don't really know what works best.
3 REPLIES 3
LinusH
Tourmaline | Level 20
Number 1 seems to be missing...?
Number 2 is obvious.
Number 3 depends on your data and what type of result you are looking for. Need more information (like sample input/output data) to comment on that one.

/Linus
Data never sleeps
GertNissen
Barite | Level 11
A candidate for rule number 1 could be : select/keep only the variables you need
mojerry
Calcite | Level 5
yeah, golden rules 😉

1. Select only the data you really need. So select the needed columns and create a where close who gives you only the relevant data.

2. If working on huge data, indexes can be usefull. Too complicated indexes will kill your performance.

3. Use the right formats on datasets. $200. isn't usefull to store yes or no. Same idea on numbers, don't store them as text 😉

4. data is stored on other disk than your sas work.

5. go on...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 874 views
  • 0 likes
  • 4 in conversation