Data in Memory

Important

Every SAS data file is stored on a computer drive, somewhere (see Saving SAS Data). This includes temporary data in the WORK library.

Each time SAS needs to access your data - for each PROC and each DATA step - it has to read from a computer drive. Because reading and writing data on disks is “slow” in computing terms, this would be a major bottleneck in SAS computing, if SAS didn’t also take advantage of today’s large quantities of computer memory (RAM).

Tip

Minimize the number of DATA and PROC steps required to get your work done.

Ordinarily, SAS makes use of a computer’s disk caches to read and write data from/to files. These “read” and “write” caches are provided by the computer operating system. On the SSCC servers, large quantities of memory are available for read and write caches.

When data is read from a disk, it is retained in a buffer in memory buffer in case you request it again. The first time you use a SAS data set in a PROC step, this might take a substantial amount of time, but in subsequent PROC steps it can be processed very quickly. Similarly, a write buffer speeds up how quickly SAS can write out a data set, letting the operating system absorb any delay while SAS moves on to it’s next task.