Problem Note 9529: Performing a COUNT or COUNT DISTINCT on a renamed column that is part of
a view may result in performance degradation
Performing a COUNT(XXX) or COUNT(distinct XXX) on a column that was
renamed from its original name when the SAS view was created may degrade
performance.
Rather than passing the function to DB2, SAS removes it and processes
the function itself. This results in all rows being retrieved from
DB2 increasing the time it takes for the query to run.
An example that would cause this situation to occur is as follows:
libname db2lib db2 authid=sasdemo ssid=db2p;
proc sql;
create view test as
select employeenumber as empid
from db2lib.employees;
select count(distinct empid) as empcount
from test;
quit;
A Technical Support hot fix for Release 8.2 (TS2M0) for this
issue is available at:
http://www.sas.com/techsup/download/hotfix/82_sbcs_prod_list.html#009529
For customers running SAS with Asian Language Support (DBCS), this
hot fix should be downloaded from:
http://www.sas.com/techsup/download/hotfix/82_dbcs_prod_list.html#009529
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to DB2 | z/OS | 8.2 TS2M0 | 9.1 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.
| Type: | Problem Note |
| Priority: | medium |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> DB2 SAS Reference ==> LIBNAME Engines
|
| Date Modified: | 2003-06-13 13:56:39 |
| Date Created: | 2003-02-27 12:50:26 |