(1) It's not ALWAYS true that pushing a sort to the database will save time. In my previous job ... meaning I can't get to the doco, so this is from memory ... I had one proc sql data extract from a SQL-Server database that seemed unexpectedly slow, with a list of 6 vars in the Order By. I removed the Order By, and sorted the return dataset (maybe 4 million records) in SAS, at about 1/4 of the elapsed wall time. Surprised by these results, I tested it both ways three times, and the results were consistent. Taking out the Order By was the only change I made to the proc sql code. I remain rather baffled by this.

(2) AFAIK, you can still avoid a physical sort on a large SAS dataset by indexing it first, then using a BY statement on whatever you do next. This incurs two costs, one to index the data and then a second because Mr SAS has to jump around when retrieving the data instead of doing its normal very fast "full table scan" approach. If you are only reading the data a few times, this usually works faster than a sort. On a dataset that's used a lot, at some point the cumulative effect of the jump-around read ends up consuming more time (than one sort and then a bunch of ful table scans.)

But sometimes a dataset is just too big to sort with the skimpy resources your IT dept will give you, so it's good to know work-arounds.