SAS/ACCESS Interface to DB2 Under z/OS |
Overview |
Autopartitioning for SAS/ACCESS Interface to DB2 under z/OS is a modulo (MOD) method. Threaded reads for DB2 under z/OS involve a trade-off. A threaded read with even distribution of rows across the threads substantially reduces elapsed time for your SAS step. So your job completes in less time. This is positive for job turnaround time, particularly if your job needs to complete within a constrained period of time. However, threaded reads always increase the CPU time of your SAS job and the workload on DB2. If increasing CPU consumption or increasing DB2 workload for your job are unacceptable, you can turn threaded reads off by specifying DBSLICEPARM=NONE. To turn off threaded reads for all SAS jobs, set DBSLICEPARM=NONE in the SAS restricted options table.
For general information about this feature, see Autopartitioning Techniques in SAS/ACCESS.
Autopartitioning Restrictions |
SAS/ACCESS Interface to DB2 under z/OS places additional restrictions on the columns that you can use for the partitioning column during the autopartitioning phase. Here are the column types that you can partition.
You must confine eligible DECIMAL columns to an integer range--specifically, DECIMAL columns with precision that is less than 10. For example, DECIMAL(5,0) and DECIMAL(9,2) are eligible.
Column Selection for MOD Partitioning |
If multiple columns are eligible for partitioning, the engine queries the DB2 system tables for information about identity columns and simple indexes. Based on the information about the identity columns, simple indexes, column types, and column nullability, the partitioning column is selected in order by priority:
Unique simple index: SHORT or INT, integral DECIMAL, and then nonintegral DECIMAL
Nonunique simple index: SHORT or INT (NOT NULL), integral DECIMAL (NOT NULL), and then nonintegral DECIMAL (NOT NULL)
Nonunique simple index: SHORT or INT (nullable), integral DECIMAL (nullable), and then nonintegral DECIMAL (nullable)
SHORT or INT (NOT NULL), integral DECIMAL (NOT NULL), and then nonintegral DECIMAL (NOT NULL)
SHORT or INT (nullable), integral DECIMAL (nullable), and then nonintegral DECIMAL (nullable)
If a nullable column is selected for autopartitioning, the SQL statement OR<column-name>IS NULL is appended at the end of the SQL code that is generated for one read thread. This ensures that any possible NULL values are returned in the result set.
How WHERE Clauses Restrict Autopartitioning |
Autopartitioning does not select a column to be the partitioning column if it appears in a SAS WHERE clause. For example, this DATA step cannot use a threaded read to retrieve the data because all numeric columns in the table (see the table definition in Using DBSLICE=) are in the WHERE clause:
data work.locemp; set trlib.MYEMPS; where EMPNUM<=30 and ISTENURE=0 and SALARY<=35000 and NUMCLASS>2; run;
Using DBSLICEPARM= |
SAS/ACCESS Interface to DB2 under z/OS defaults to two threads when you use autopartitioning.
Using DBSLICE= |
You can achieve the best possible performance when using threaded reads by specifying the DBSLICE= data set option for DB2 in your SAS operation.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.