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.

316 DBSLICE= Data Set Option 4 Chapter 11DBSLICE= Data Set OptionSpecifies user-supplied WHERE clauses to partition a DBMS query <strong>for</strong> threaded reads.Default value: noneValid in: DATA and PROC steps (when accessing DBMS data using <strong>SAS</strong>/<strong>ACCESS</strong>software)DBMS support: DB2 under UNIX and PC Hosts, DB2 under z/OS, HP Neoview, In<strong>for</strong>mix,Microsoft SQL Server, ODBC, Oracle, Sybase, Sybase IQ, TeradataSyntaxDBSLICE=("WHERE-clause-1" "WHERE-clause-2" < ... " WHERE-clause-n">)DBSLICE=("WHERE-clause-1" " WHERE-clause-2" )Syntax DescriptionTwo syntax diagrams are shown here to highlight the simpler version. In manycases, the first, simpler syntax is sufficient. The optional server= <strong>for</strong>m is valid only <strong>for</strong>DB2 under UNIX and PC Hosts, Netezza, and ODBC.WHERE-clauseThe WHERE clauses in the syntax signifies DBMS-valid WHERE clauses thatpartition the data. The clauses should not cause any omissions or duplications ofrows in the results set. For example, if EMPNUM can be null, this DBSLICE=specification omits rows, creating an incorrect result set:DBSLICE=("EMPNUM=1000")A correct <strong>for</strong>m is:DBSLICE=("EMPNUM=1000" "EMPNUM IS NULL")In this example, DBSLICE= creates an incorrect set by duplicating SALES with avalue of 0:DBSLICE=(‘‘SALES=0’’)serveridentifies a particular server node in a DB2 partitioned database or in a MicrosoftSQL Server partitioned view. Use this to obtain the best possible read per<strong>for</strong>manceso that your <strong>SAS</strong> thread can connect directly to the node that contains the datapartition that corresponds to your WHERE clause. See the DBMS-specific referencesection <strong>for</strong> your interface <strong>for</strong> details.DetailsIf your table reference is eligible <strong>for</strong> threaded reads (that is, if it is a read-onlyLIBNAME table reference), DBSLICE= <strong>for</strong>ces a threaded read to occur, partitioning thetable with the WHERE clauses you supply. Use DBSLICE= when <strong>SAS</strong> is unable togenerate threaded reads automatically, or if you can provide better partitioning.DBSLICE= is appropriate <strong>for</strong> experienced programmers familiar with the layout oftheir DBMS tables. A well-tuned DBSLICE= specification usually outper<strong>for</strong>ms <strong>SAS</strong>

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

Saved successfully!

Ooh no, something went wrong!