Chapter 12
Optimizing System Performance
Definitions for Optimizing System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Collecting and Interpreting Performance Statistics . . . . . . . . . . . . . . . . . . . . . . . . 196
Using the FULLSTIMER and STIMER System Options . . . . . . . . . . . . . . . . . . . 196
Interpreting FULLSTIMER and STIMER Statistics . . . . . . . . . . . . . . . . . . . . . . . 197
Techniques for Optimizing I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Overview of Techniques for Optimizing I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Using WHERE Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using DROP and KEEP Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Using LENGTH Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Using the OBS= and FIRSTOBS= Data Set Options . . . . . . . . . . . . . . . . . . . . . . . 199
Creating SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Using Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Accessing Data through SAS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Using Engines Efficiently . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Setting System Options to Improve I/O Performance . . . . . . . . . . . . . . . . . . . . . . 201
Setting VBUFSIZE= and OBSBUF= for SAS DATA Step Views . . . . . . . . . . . . . 203
Using the SASFILE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Using the DATASETS Procedure to Modify Attributes . . . . . . . . . . . . . . . . . . . . . 203
Storing Variables as Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Techniques for Optimizing Memory Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
System Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Using the BY Statement with PROC MEANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Techniques for Optimizing CPU Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Reducing CPU Time By Using More Memory or Reducing I/O . . . . . . . . . . . . . . 204
Storing a Compiled Program for Computation-Intensive DATA Steps . . . . . . . . . 205
Reducing Search Time for SAS Executable Files . . . . . . . . . . . . . . . . . . . . . . . . . 205
Specifying Variable Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Using Parallel Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Reducing CPU Time By Modifying Program Compilation Optimization . . . . . . . 205
Calculating Data Set Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
195

Get SAS 9.4 Language Reference, 6th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.