13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Threaded Reads 4 Options That Affect Threaded Reads 53data reads, numerical algorithms, and data analysis in threads. Only some <strong>SAS</strong>procedures are threaded applications. Here is a basic example of PROC REG, a <strong>SAS</strong>threaded application:libname lib oracle user=scott password=tiger;proc reg simpledata=lib.salesdata (keep=salesnumber maxsales);var _all_;run;For DBMSs, many more <strong>SAS</strong> steps can become eligible <strong>for</strong> a threaded read,specifically, steps with a read-only table. A libref has the <strong>for</strong>m Lib.DbTable, where Libis a <strong>SAS</strong> libref that "points" to DBMS data, and DbTable is a DBMS table. Here aresample read-only tables <strong>for</strong> 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 <strong>SAS</strong> step can require user assistance to actually per<strong>for</strong>m threaded reads.If <strong>SAS</strong> cannot automatically generate a partitioning WHERE clause or otherwiseper<strong>for</strong>m threaded reads, the user can code an option that supplies partitioning. Todetermine whether <strong>SAS</strong> can automatically generate a partitioning WHERE clause, usethe <strong>SAS</strong>TRACE= and <strong>SAS</strong>TRACELOC= system options.Threaded reads can be turned off altogether. This eliminates additional DBMSactivity associated with <strong>SAS</strong> threaded reads, such as additional DBMS connections andmultiple SQL statements.Threaded reads are not supported <strong>for</strong> the Pass-Through Facility, in which you codeyour own DBMS-specific SQL that is passed directly to the DBMS <strong>for</strong> processing.Options That Affect Threaded ReadsFor threaded reads from DBMSs, <strong>SAS</strong>/<strong>ACCESS</strong> provides these data set options:DBLICE= and DBSLICEPARM=.DBSLICE= applies only to a table reference. You can use it to code your ownWHERE clauses to partition table data across threads, and it is useful when you arefamiliar with your table data. For example, if your DBMS table has a CHAR(1) columnGender and your clients are approximately half female, Gender equally partitions thetable into two parts. Here is an example:proc print data=lib.dbtable (dbslice=("gender=’f’" "gender=’m’"));where dbcol>1000;run;<strong>SAS</strong> creates two threads and about half of the data is delivered in parallel on eachconnection.When applying DBSLICEPARM=ALL instead of DBSLICE=, <strong>SAS</strong> attempts to"autopartition" the table <strong>for</strong> you. With the default DBSLICEPARM=THREADED_APPSsetting, <strong>SAS</strong> automatically attempts threaded reads only <strong>for</strong> <strong>SAS</strong> threaded applications,which are <strong>SAS</strong> procedures that thread I/O and numeric operations.DBSLICEPARM=ALL extends threaded reads to more <strong>SAS</strong> procedures, specifically

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!