Date: Mon, 21 Dec 2009 02:58:10 -0800
Reply-To: RolandRB <rolandberry@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: RolandRB <rolandberry@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: PROC SORT performance difference with the WHERE clause
Content-Type: text/plain; charset=ISO-8859-1
I have just come across a situation where PROC SORT performance is 10
times faster if the WHERE claase is applied to the PROC SORT step
rather than applied to the input dataset. In other words:
PROC SORT DATA=in OUT=OUT;
BY vara varb;
WHERE condition;
RUN;
....works 10 times faster than.....
PROC SORT DATA=in(WHERE=(condition)) OUT=OUT;
BY vara varb;
RUN;
....for exactly the same WHERE condition creating exactly the samer
number of observations in the output dataset. I am talking one minute
compared to 10 minutes for the elapsed sort time. In both cases I
think the data is coming from an ORACLE table. Is there an explanation
for this difference in performance that I could read about someplace?