DATA Step, Macro, Functions and more

Can anyone confirm these statements?

Posts: 20

Can anyone confirm these statements?

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.
Super User
Posts: 5,876

Re: Can anyone confirm these statements?

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.

Data never sleeps
SAS Employee
Posts: 183

Re: Can anyone confirm these statements?

A candidate for rule number 1 could be : select/keep only the variables you need
New Contributor
Posts: 3

Re: Can anyone confirm these statements?

Posted in reply to GertNissen
yeah, golden rules Smiley Wink

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 Smiley Wink

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

5. go on...
Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation