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.

138 DBSLICEPARM= LIBNAME Option 4 Chapter 10DBSLICEPARM=( NONE | THREADED_APPS | ALL)DBSLICEPARM=( NONE | THREADED_APPS | ALL)Syntax DescriptionTwo syntax diagrams are shown here in order to highlight the simpler version. Inmost cases, the simpler version suffices.NONEdisables DBMS threaded read. <strong>SAS</strong> reads tables on a single DBMS connection, as itdid with <strong>SAS</strong> 8 and earlier.THREADED_APPSmakes fully threaded <strong>SAS</strong> procedures (threaded applications) eligible <strong>for</strong> threadedreads.ALLmakes all read-only librefs eligible <strong>for</strong> threaded reads. This includes <strong>SAS</strong> threadedapplications, as well as the <strong>SAS</strong> DATA step and numerous <strong>SAS</strong> procedures.max-threadsa positive integer value that specifies the number of threads that are used to readthe table in parallel. The second parameter of the DBSLICEPARM= LIBNAMEoption determines the number of threads to read the table in parallel. The number ofpartitions on the table determine the number of connections made to the Oracleserver <strong>for</strong> retrieving rows from the table. A partition or portion of the data is read oneach connection. The combined rows across all partitions are the same regardless ofthe number of connections. Changes to the number of connections do not change theresult set. Increasing the number of connections instead redistributes the sameresult set across more connections.If the database table is not partitioned, <strong>SAS</strong> creates max-threads number ofconnections with WHERE MOD()... predicates and the same number of threads.There are diminishing returns when increasing the number of connections. Witheach additional connection, more burden is placed on the DBMS, and a smallerpercentage of time saved on the <strong>SAS</strong> step. See the DBMS-specific reference section<strong>for</strong> details about partitioned reads be<strong>for</strong>e using this parameter.DetailsYou can use DBSLICEPARM= in numerous locations. The usual rules of optionprecedence apply: A table option has the highest precedence, then a LIBNAME option,and so on. <strong>SAS</strong> configuration file option has the lowest precedence becauseDBSLICEPARM= in any of the other locations overrides that configuration setting.DBSLICEPARM=ALL and DBSLICEPARM=THREADED_APPS make <strong>SAS</strong> programseligible <strong>for</strong> threaded reads. To see whether threaded reads are actually generated, turnon <strong>SAS</strong> tracing and run a program, as shown in this example:options sastrace=’’,,t’’ sastraceloc=saslog nostsuffix;proc print data=lib.dbtable(dbsliceparm=(ALL));where dbcol>1000;run;If you want to directly control the threading behavior, use the DBSLICE= data setoption.DB2 under UNIX and PC Hosts, In<strong>for</strong>mix, Microsoft SQL Server, ODBC, Sybase,Sybase IQ: The default thread number depends on whether an application passes in thenumber of threads (CPUCOUNT=) and whether the data type of the column that wasselected <strong>for</strong> purposes of data partitioning is binary.

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

Saved successfully!

Ooh no, something went wrong!