FYI, PROC MEANS (and some other SAS Base procs) do "push" processing to the database where possible. You do have to make sure that your code doesn't do anything to scuttle this effort though, such as running PROC SORT first or passing an SQL view into the proc. This is why you might notice that EG tasks now generate slightly different syntax when running against database tables (which don't need to be sorted for BY processing) versus native SAS data sets (which do need to be sorted when using BY group processing). See: Getting out of SORTs with SAS data - The SAS Dummy and Base SAS(R) 9.2 Procedures Guide Chris
... View more