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 (August 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 9 Aug 2000 21:26:14 +1200
Reply-To:   Don Stanley <don_stanley@XTRA.CO.NZ>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Don Stanley <don_stanley@XTRA.CO.NZ>
Subject:   WHERE clause and PUT function -- inefficient comapred to IF
Content-Type:   text/plain; charset=us-ascii

This might be useful .. esp if you're charged by CPU.

Be wary of using the dataset option WHERE=, having a PUT function in the WHERE, and using a user defined format. It can add a lot of extra CPU time to your step.

Found this today under MVS 609E. Reading 6 million records as follows::

set x (where=(put(prod,$select.) eq 'Y') ;

took 210 seconds CPU. Changing this to

set x ; if put(prod,$select.) eq 'Y' ;

took 130 CPU seconds.

We also noted this with a SAS dataset on tape, reducing CPU time from 100 seconds to 20 by swapping from the WHERE to an IF.

I reported this to SAS, nothing obvious on usage notes -- one hit on WHERE being less efficient than IF related to short observation widths and is not our situation. I'll pass on the tech support response when it arrives.

Haven't yet checked if a problem with other functions, WHERE clauses outside dataset option, formats other than user-defined etc etc.

Don

-- Don Stanley, B.SC, Dip O.R.S, MNZCS Director, Sysware Consulting Group Box 634, Wellington, NEW ZEALAND

http://www.sysware.co.nz EMAIL:: don_stanley@xtra.co.nz

Author:: Beyond the obvious with SAS Screen Control Language. Author:: Solutions for your GUI Applications Development Using SAS/AF FRAME Technology

http://www.geocities.com/don_stanley_nz/don_home.htm Genealogy:: http://www.geocities.com/don_stanley_nz/family.htm SAS Tips:: http://www.geocities.com/don_stanley_nz/sastips.htm


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