Problem Note 33059: The MEANS procedure (PROC MEANS) runs slowly with the THREADS option when the median statistic is calculated on a variable with unique values
When you run PROC MEANS with the THREADS option to calculate a median statistic, performance might be very slow.
This occurs if the values of the variable are unique or close to unique.
Performance is better if you run the procedure with the NOTHREADS option.
To work around this issue use the qmethod=p2, as in the following example:
data huge;
do i=1 to 100;
do j=1 to 100;
do k=1 to 100;
x=ranuni(3);
output;
end;
end;
end;
run;
proc means data=huge noprint threads qmethod=p2;
class i j k;
output out=stat2 mean=mean median=median;
run;
Operating System and Release Information
| SAS System | SAS Foundation | z/OS | 9.2 TS1M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
| Microsoft® Windows® for x64 | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
| Microsoft Windows XP Professional | 9.2 TS1M0 | |
| Windows Vista | 9.2 TS1M0 | |
| 64-bit Enabled AIX | 9.2 TS1M0 | |
| 64-bit Enabled HP-UX | 9.2 TS1M0 | |
| 64-bit Enabled Solaris | 9.2 TS1M0 | |
| HP-UX IPF | 9.2 TS1M0 | |
| Linux | 9.2 TS1M0 | |
| Linux for x64 | 9.2 TS1M0 | |
| OpenVMS on HP Integrity | 9.2 TS1M0 | |
| Solaris for x64 | 9.2 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
PROC MEANS runs faster with the NOTHREADS option than with the THREADS option when the median statistic is calculated on a variable with unique values.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2008-09-26 13:01:56 |
| Date Created: | 2008-08-25 17:30:36 |