Previous Page | Next Page

Threaded Reads

Options That Affect Threaded Reads

For threaded reads from DBMSs, SAS/ACCESS provides these data set options: DBLICE= and DBSLICEPARM=.

DBSLICE= applies only to a table reference. You can use it to code your own WHERE clauses to partition table data across threads, and it is useful when you are familiar with your table data. For example, if your DBMS table has a CHAR(1) column Gender and your clients are approximately half female, Gender equally partitions the table into two parts. Here is an example:

proc print data=lib.dbtable (dbslice=("gender='f'" "gender='m'"));
where dbcol>1000;
run;

SAS creates two threads and about half of the data is delivered in parallel on each connection.

When applying DBSLICEPARM=ALL instead of DBSLICE=, SAS attempts to "autopartition" the table for you. With the default DBSLICEPARM=THREADED_APPS setting, SAS automatically attempts threaded reads only for SAS threaded applications, which are SAS procedures that thread I/O and numeric operations. DBSLICEPARM=ALL extends threaded reads to more SAS procedures, specifically steps that only read tables. Or, DBSLICEPARM=NONE turns it off entirely. You can specify it as a data set option, a LIBNAME option, or a global SAS option.

The first argument to DBSLICEPARM= is required and extends or restricts threaded reads. The second optional argument is not commonly used and limits the number of DBMS connections. These examples demonstrate the different uses of DBSLICEPARM=.

DBSLICE= and DBSLICEPARM= apply only to DBMS table reads. THREADS= and CPUCOUNT= are additional SAS options that apply to threaded applications. For more information about these options, see the SAS Language Reference: Dictionary.

Previous Page | Next Page | Top of Page