Thanks all for your comments I have made one text splitting the dataset in 10 smaller datasets, the results given are below options fullstimer; proc sort data = Dataset_A out = Dataset_B (compress=binary); by KEY; run; NOTE: There were 32498768 observations read from the data set Dataset_A. NOTE: The data set WORK.PERSONSHORT has 32498768 observations and 31 variables. NOTE: Compressing data set Dataset_B decreased size by 71.08 percent. Compressed is 391645 pages; un-compressed would require 1354116 pages. NOTE: PROCEDURE SORT used (Total process time): real time 44:04.28 user cpu time 1:54.30 system cpu time 1:13.66 Memory 66929k OS Memory 100216k Timestamp 16/09/2014 17:22:45 Now I splitt the dataset with a macro (thanks to Selvaratnam Sridharma for the tool ) data _null_; 33 if 0 then set ec_dim_per nobs=count; 34 call symput('numobs',put(count,8.)); 35 run; 36 %let n=%sysevalf(&numobs/&num,ceil); 37 data %do J=1 %to &num ; DATASET_B_&J %end; ; 38 set DATASET_B; 39 %do I=1 %to # 40 if %eval(&n*(&i-1)) <_n_ <= %eval(&n*&I) 41 then output DATASET_B_&I; 42 %end; 43 run; 44 %mend split; 45 %split (10) NOTE: DATA STEP stopped due to looping. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time 0.00 seconds NOTE: There were 32498768 observations read from the data set WORK.DATASET_B. NOTE: The data set WORK.DATASET_B_1 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_2 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_3 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_4 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_5 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_6 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_7 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_8 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_9 has 3249877 observations and 31 variables. NOTE: The data set WORK.DATASET_B_10 has 3249875 observations and 31 variables. NOTE: DATA statement used (Total process time): real time 15:13.22 cpu time 49.68 seconds NOTE: This SAS session is using a registry in WORK. All changes will be lost at the end of this session. Another macro (this time made by me ) to run all the proc sort throught the datasets 46 %macro sort; 47 %do i=1 %to 10; 48 proc sort data = DATASET_B_&i; 49 by KEY; 50 run; 51 %end; 52 run; 53 %mend sort; 54 %short NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_1. NOTE: The data set WORK.DATASET_B_1 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 4:19.91 cpu time 17.59 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_2. NOTE: The data set WORK.DATASET_B_2 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 5:08.46 cpu time 19.56 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_3. NOTE: The data set WORK.DATASET_B_3 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 2:29.01 cpu time 19.51 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_4. NOTE: The data set WORK.DATASET_B_4 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 4:03.43 cpu time 17.03 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_5. NOTE: The data set WORK.DATASET_B_5 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 6:03.90 cpu time 18.95 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_6. NOTE: The data set WORK.DATASET_B_6 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 6:44.73 cpu time 19.23 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_7. NOTE: The data set WORK.DATASET_B_7 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 2:48.26 cpu time 18.72 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_8. NOTE: The data set WORK.DATASET_B_8 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 3:36.37 cpu time 20.17 seconds NOTE: There were 3249877 observations read from the data set WORK.DATASET_B_9. NOTE: The data set WORK.DATASET_B_9 has 3249877 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 4:41.83 cpu time 19.00 seconds NOTE: There were 3249875 observations read from the data set WORK.DATASET_B_10. NOTE: The data set WORK.DATASET_B_10 has 3249875 observations and 31 variables. NOTE: PROCEDURE SORT used (Total process time): real time 3:17.87 cpu time 19.48 seconds the sum of the all sorts procedures are almost 41 min without counting the 15 min for the macro to work. And we still need a merge to build the dataset again (by the way, what do you think is the best way to merge all the datasets?) As you can see split in 10 dataset isn't faster than the original proc sort. If I able to free space I'd try with perhaps 20 small datasets. AmySwinford, I have SAS/ACCESS ready for use in my PC but I never use it and to be honest I don´t know where to start to make it work in local mode (server/cliente in the same machine). I think defragmenting the hard disk is a very good idea , I´d try if my user have admin privileges,... Regards
... View more