Previous Page | Next Page

Threaded Reads

Scope of Threaded Reads

SAS steps called threaded applications are automatically eligible for a threaded read. Threaded applications are bottom-to-top fully threaded SAS procedures that perform data reads, numerical algorithms, and data analysis in threads. Only some SAS procedures are threaded applications. Here is a basic example of PROC REG, a SAS threaded application:

libname lib oracle user=scott password=tiger;
proc reg simple
data=lib.salesdata (keep=salesnumber maxsales);
var _all_;
run;

For DBMSs, many more SAS steps can become eligible for a threaded read, specifically, steps with a read-only table. A libref has the form Lib.DbTable, where Lib is a SAS libref that "points" to DBMS data, and DbTable is a DBMS table. Here are sample read-only tables for which threaded reads can be turned on:

libname lib oracle user=scott password=tiger;
proc print data=lib.dbtable;
run;

data local;
set lib.families;
where gender="F";
run;

An eligible SAS step can require user assistance to actually perform threaded reads. If SAS cannot automatically generate a partitioning WHERE clause or otherwise perform threaded reads, the user can code an option that supplies partitioning. To determine whether SAS can automatically generate a partitioning WHERE clause, use the SASTRACE= and SASTRACELOC= system options.

Threaded reads can be turned off altogether. This eliminates additional DBMS activity associated with SAS threaded reads, such as additional DBMS connections and multiple SQL statements.

Threaded reads are not supported for the Pass-Through Facility, in which you code your own DBMS-specific SQL that is passed directly to the DBMS for processing.

Previous Page | Next Page | Top of Page