Sorting DBMS data can be resource-intensive—whether you use the SORT procedure, a BY statement, or an ORDER BY clause on a DBMS data source or in the SQL procedure SELECT statement. Sort data only when it is needed for your program.
Here are guidelines for sorting data.
libname mydblib hadoop server=hadoopsvr database=compdata user=user1
pass=mypwd1;
data exec_employees;
set mydblib.employees (keep=lastname firstname empid salary hiredate);
by hiredate;
where salary >= 75000;
run;
proc sql;
select * from exec_employees
order by salary;
quit;
sorts data according to the DBMS sort rules, the host sort rules, and the SAS sort rules. (Sorting uses the first available and pertinent sorting algorithm in this list.) This is the default.
sorts data according to host rules and then SAS rules. (Sorting uses the first available and pertinent sorting algorithm in this list.)
sorts data by SAS rules.