Date: Wed, 22 Sep 2004 15:00:47 +0400
Reply-To: Gleb Kotelnitsky <email@example.com>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gleb Kotelnitsky <gleb.kotelnitsky@GMAIL.COM>
Subject: select one of proc SORT/SQL/SUMMARY
Content-Type: text/plain; charset=US-ASCII
i have 38mln records SAS dataset counter_data with following columns:
counter_id 8. dtm datetime. consumption 8.
it has about 7000 distinct counter_id's
what i need in sql would look like:
select counter_id, dtm, sum(consumption) as consumption FROM
counter_data GROUP BY counter_id, dtm
and it takes about 2 hours for SAS to submit that request.
I tried to do that through sorting and datastep, but
it took 5 hours for SAS to proc SORT it by counter_id, dtm.
When i tried proc SUMMARY, it took 4 hours.
What'll be the best way? 2 hours is still too much.