Optimizing Data Storage |
Most SAS/ACCESS interfaces support threaded reads. With a threaded read, the table read time can be reduced by retrieving the result set on multiple connections between SAS and a DBMS. To perform a threaded read, SAS performs these tasks:
It creates threads, which are standard operating system tasks that are controlled by SAS, within the SAS session.
It establishes a DBMS connection on each thread.
It 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.
Threaded reads only increase performance when the DBMS result set is large. Performance is optimal when the partitions are similar in size. In most cases, threaded reads should reduce the elapsed time of the SAS job. However, threaded reads generally increase the workload on the DBMS. For instance, threaded reads for DB2 under z/OS involve a trade-off, generally reducing job elapsed time but increasing DB2 workload and CPU utilization.
Threaded reads are most effective on new, faster computer hardware running SAS, and with a powerful parallel edition of the DBMS. For example, if SAS runs on a fast uniprocessor or on a multiprocessor machine and your DBMS runs on a high-end SMP server, you will receive substantial performance gains.
For information about how to turn the threaded read function on or off for a DBMS library, see Setting LIBNAME Options That Affect Performance of SAS/ACCESS Databases.
For information about threaded reads, see SAS/ACCESS for Relational Databases: Reference.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.