Date: Thu, 27 May 2010 12:24:16 -0700
Reply-To: "Choate, Paul@DDS" <Paul.Choate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <Paul.Choate@DDS.CA.GOV>
Subject: Re: <= versus =
In-Reply-To: <201005271842.o4RAn1dD003801@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Christine -
You need to post your (1) macro code and (2) your full log at least, and preferably strip it down and include some dummy data that replicates your problem.
EQ returns the same or fewer results than LE, so for your program to be running more slowly using fewer found records does not make prima facie sense.
The statements might be nested in some larger negation turning the EQ to NE and the LE to GT. NE can select a much larger subset than GT, so in that case your issue would make sense.
Your code might be from a datastep merge or an SQL join. SQL joins can be very sensitive to logic changes - they rely on the SQL optimizer to select an efficient join, but the new condition might force a much less efficient join.
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Christine Peloquin
Sent: Thursday, May 27, 2010 11:42 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: <= versus =
hello.
i changed one line in a macro:
from
year (control_enrollment_start_date) <= year (case_enrollment_start_date)
to
year (control_enrollment_start_date) = year (case_enrollment_start_date).
the macro is still executing properly but it is taking MUCH MUCH longer to
run. any idea of why this might be? and what i could do to get this to run
faster? is it something to do with how SAS evaluates = vs <=? or is there
something to do with the YEAR function?
many thanks on any type of lead you can give.
christine