| Product | Release |
|---|---|
| SAS/ACCESS Interface to Sybase | 9.21 |
| SAS/ACCESS Interface to Oracle | 9.21 |
| SAS/ACCESS Interface to DB2 | 9.21 |
| SAS/ACCESS Interface to Greenplum | 9.21 |
| SAS/ACCESS Interface to Netezza | 9.21 |
| SAS/ACCESS Interface to ODBC | 9.21 |
| SAS/ACCESS Interface to Teradata | 9.21 |
| SAS/ACCESS Interface to Sybase IQ | 9.21 |
| SAS/ACCESS Interface to MySQL | 9.21 |
| SAS/ACCESS Interface to Microsoft SQL Server | 9.21 |
| SAS/ACCESS Interface to HP Neoview | 9.21 |
| SAS/ACCESS Interface to Informix | 9.21 |
| SAS/ACCESS Interface to OLE DB | 9.21 |
| Previous Page | | | Next Page |
| Threaded Reads |
To perform a threaded read, SAS first creates threads within the SAS session. Threads are standard operating system tasks that SAS controls. SAS then establishes a DBMS connection on each thread, causes the DBMS to partition the result set, and reads one partition per thread. To cause the partitioning, SAS appends a WHERE clause to the SQL so that a single SQL statement becomes multiple SQL statements, one for each thread. Here is an example.
proc reg SIMPLE data=dblib.salesdata (keep=salesnumber maxsales);
var _ALL_; run;
Previous versions of SAS opened a single connection and issued:
SELECT salesnumber,maxsales FROM SALESDATA;
Assuming that SalesData has an integer column EmployeeNum, SAS 9.1, might open two connections by issuing these statements:
SELECT salesnumber,maxsales FROM salesdata WHERE (EMPLOYEENUM mod 2)=0;
and
SELECT salesnumber,maxsales FROM SALESDATA WHERE (EMPLOYEENUM mod 2)=1;
See Autopartitioning Techniques in SAS/ACCESS for more information about MOD.
Note: Might is an important word here.
Most but not all SAS/ACCESS interfaces
support threaded reads in SAS 9.1. The partitioning WHERE clauses that SAS
generates vary. In cases where SAS cannot always generate partitioning WHERE
clauses, the SAS user can supply them. In addition to WHERE clauses, other
ways to partition data might also exist. ![[cautionend]](../../../../common/62850/HTML/default/images/cautend.gif)
| Previous Page | | | Next Page | | | Top of Page |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
