Tag: Optimization

Date and datetime: accuracy vs storage and I/O costs (SAS)

How much storage space and I/O resources can be saved by using the LENGTH statement to shrink the storage of date and datetimes while maintaining sufficient precision? In my experience, saving I/O generally makes SAS run faster (such as in a DATA step)…

Birthday gift code puzzle

This is a SAS code puzzle. The code works as is, but can you make it simpler? We do this while enjoying simulation and the quirkiness of the Gregorian calendar. The problem A person receives a gift on a random day. Relative to his birthday, how many da…

Make SAS much faster with data set compression

R is fast at processing data sets, but it is limited by memory (physical RAM plus swap). SAS processes much larger data sets, but it is slow because it keeps the data sets on the hard drive. Although computer processors have become faster and memory la…

Make SAS PROC SQL UPDATE faster with CALL EXECUTE

I have an ETL job that updates 10,000 rows in a large, remote Microsoft SQL table with 700,000 rows (1.4%). (The specific brand of remote SQL database doesn’t matter: this should work equally well for any ODBC RDMS.) This tutorial shows two ways …