To see the difference in performance
between the DATA step and the PROC step, submit this code:
options fullstimer;
/* Create a test data set with some random data. */
DATA a (drop=s);
do i = 1 to 500000;
x = ranuni(i);
y = x*2;
z = exp(x*y);
output;
end;
/* The sleep helps to delineate the subsequent */
/* sort in the Performance Monitor graph */
s = sleep(15);
run;
PROC sort data = a noduplicates;
by z y x i;
run;
Performance of the DATA Step and the PROC SORT Step
The DATA step in the
display shows that there is very little activity from Disk ReadFile
Bytes Read/Sec or Disk SetFilePointer/Sec. Notice that in the subsequent
PROC SORT output there is much more activity from these two counters.
The output indicates that the data set is being read (Disk Readfile
Bytes Read/Sec) in order to be sorted, and that a certain amount of
random I/O is performed by the sort (Disk SetFilePointer/Sec).
The pause in the activity
is caused by the SLEEP function that follows the DATA step. The Disk
WriteFile Bytes Written/Sec counter is active in both the DATA step
and in the PROC SORT step.
Finally, you can correlate
the counters from the Process object with the user and system CPU
times in your SAS log.