LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 10 Apr 2004 13:20:34 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: Capturing sql statement run times in a dataset

What I've done is capture timestamps into macrovariables before and after running the code I want to time, then use SQL to stuff the the timestamps (along with other variables which identify and characterize the experiment) into a table.

Some code fragments:

%let starttime = %sysfunc(dhms(%sysfunc(today()), 0, 0, %sysfunc(time())));

[code to be timed]

%let endtime = %sysfunc(dhms(%sysfunc(today()), 0, 0, %sysfunc(time())));

proc sql;

insert into testdir.log set starttime = &STARTTIME , endtime = &ENDTIME ;

quit;

On Fri, 9 Apr 2004 15:42:53 -0700, Pardee, Roy <pardee.r@GHC.ORG> wrote:

>Hey All, > >I'm trying to compare query performance against sql/view and real >versions of a particular dataset, to see whether the space I save w/the >view is worth the extra cpu time it takes to query the view. > >I'd like to do a bunch of different queries & build the run times up in >a dataset that I can thereafter analyze. I've been over the docs for >proc sql & macro, but haven't found a way to do it. Does anyone know >how? I'm on v8.2 on win2k. > >Thanks! > >-Roy > >Roy Pardee >Research Analyst/Programmer >Center For Health Studies (Cancer Research Network) >Group Health Cooperative >(206) 287-2078 > >This message and any attached files might contain confidential >information protected by federal and state law. The information is >intended only for the use of the individual(s) or entities originally >named as addressees. The improper disclosure of such information may be >subject to civil or criminal penalties. If this message reached you in >error, please contact the sender and destroy this message. Disclosing, >copying, forwarding, or distributing the information by unauthorized >individuals or entities is strictly prohibited by law.


Back to: Top of message | Previous page | Main SAS-L page