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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data Set Options <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 DBSLICEPARM= Data Set Option 317automatic partitioning. For example, a well-tuned DBSLICE= specification might betterdistribute data across threads by taking advantage of a column that <strong>SAS</strong>/<strong>ACCESS</strong>cannot use when it automatically generates partitioning WHERE clauses.DBSLICE= delivers optimal per<strong>for</strong>mance <strong>for</strong> DB2 under UNIX and <strong>for</strong> Microsoft SQLServer. Conversely, DBSLICE= can degrade per<strong>for</strong>mance compared to automaticpartitioning. For example, Teradata starts the FastExport Utility <strong>for</strong> automaticpartitioning. If DBSLICE= overrides this action, WHERE clauses are generatedinstead. Even with well planned WHERE clauses, per<strong>for</strong>mance is degraded becauseFastExport is considerably faster.CAUTION:When using DBSLICE=, you are responsible <strong>for</strong> data integrity. If your WHERE clauses omitrows from the result set or retrieves the same row on more than one thread, your inputDBMS result set is incorrect and your <strong>SAS</strong> program generates incorrect results. 4ExamplesIn this example, DBSLICE= partitions on the GENDER column can have only thevalues m, M, f, and F. This DBSLICE= clause does not work <strong>for</strong> all DBMSs due to theuse of UPPER and single quotation marks. Some DBMSs require double quotationmarks around character literals. Two threads are created.proc reg SIMPLEdata=lib.customers(DBSLICE="UPPER(GENDER)=’M’" "UPPER(GENDER)=’F’"));var age weight;where years_active>1;run;The next example partitions on the non-null column CHILDREN, the number ofchildren in a family. Three threads are created.data local;set lib.families(DBSLICE=("CHILDREN2" "CHILDREN=2"));where religion="P";run;See Also“DBSLICEPARM= LIBNAME Option” on page 137“DBSLICEPARM= Data Set Option” on page 317DBSLICEPARM= Data Set OptionControls the scope of DBMS threaded reads and the number of DBMS connections.Default value: THREADED_APPS,2 [DB2 under z/OS, Oracle, and Teradata]THREADED_APPS,2 or 3 [DB2 under UNIX and PC Hosts, HP Neoview, In<strong>for</strong>mix,Microsoft SQL Server, ODBC, and Sybase, Sybase IQ]Valid in: DATA and PROC Steps (when accessing DBMS data using <strong>SAS</strong>/<strong>ACCESS</strong>software) (also available as a <strong>SAS</strong> configuration file option, <strong>SAS</strong> invocation option,global <strong>SAS</strong> option, and LIBNAME option)

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

Saved successfully!

Ooh no, something went wrong!