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 =
Content-Type: text/plain; charset="us-ascii"
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.
DDS Data Extraction
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Christine Peloquin
Sent: Thursday, May 27, 2010 11:42 AM
Subject: <= versus =
i changed one line in a macro:
year (control_enrollment_start_date) <= year (case_enrollment_start_date)
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.