I'm having what I perceive as slowness issues in my macro sql code and want to determine if it's just my computer. The code below cycles through creating and deleting a table 1000 times. It takes my computer 18 seconds to run. If anyone has a spare minute, can you let me know how long this takes to run on your pc and what kind of hardware you're using?
Being teased a little about my system performance, I decided to look a little closer.
I'm using a single processor machine, which might affect results.
I was testing the run under DM, where calculating total cpu time is inconvenient across 100 steps, let alone 1000!
Under batch SAS9.1 the log shows the totalled time at a more reasonable pace[pre] real time 22.46 seconds
user cpu time 1.49 seconds
system cpu time 2.82 seconds[/pre]
However, under DM there are extra overheads (like EG but different).
To simplify the calculation of total cpu for 1000 creates/deletes, I tested this variation
%macro timetst() ;
%do i = 1 %to 1000 ;
CREATE TABLE tabletest (test int) ;
DROP TABLE tabletest ;
%mend timetst ;
proc sql noprint;
This provides times for the single SQL step:[pre]NOTE: PROCEDURE SQL used (Total process time):
real time 18.46 seconds
user cpu time 0.92 seconds
system cpu time 2.10 seconds
Memory 60k [/pre]
Running the code in batch provided these step times[pre]NOTE: PROCEDURE SQL used (Total process time):
real time 15.71 seconds
user cpu time 0.85 seconds
system cpu time 2.42 seconds
There is no way my elapse time would be below 10 secs let alone under 4 secs!
Perhaps I should not load up my machine with so many activities;-)
Explore using the ALTLOG system option at start-up along with the appropriate diagnostic output settings like FULLSTIME - also consider other SAS performance analysis techniques mentioned in this paper:
thanks for suggestion of the at paper. I'll have a look.
I haven't found fullstimer or altlog providing adequate precision to total the brief cpu times of the sql create and delete steps in these steps. That's why I was asking for something else. The time(), datetime() etc. functions enable calculation of (single-threading) wallclock times. For CPU times, I'm hoping the "practicalPerf" paper might come up with something like ARM (or log4sas).
unfortunately, I'm not finding what I wanted in that paper