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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Teradata 4 FastExport Versus Partitioning WHERE Clauses 795FastExport <strong>for</strong> explicit SQL is a Teradata extension only, <strong>for</strong> optimizing readoperations, and is not covered in the threaded read documentation.Exceptions to Using FastExportWith the Teradata FastExport Utility and the SasAxsm module in place that <strong>SAS</strong>supplies, FastExport works automatically <strong>for</strong> all <strong>SAS</strong> steps that have threaded readsenabled, except <strong>for</strong> one situation. FastExport does not handle single Access ModuleProcessor (AMP) queries. In this case, <strong>SAS</strong>/<strong>ACCESS</strong> simply reverts to a normal singleconnection read. For in<strong>for</strong>mation about FastExport and single AMP queries, see yourTeradata documentation.To determine whether FastExport worked, turn on <strong>SAS</strong> tracing in advance of thestep that attempts to use FastExport. If you use FastExport, you receive this (Englishonly) message, which is written to your <strong>SAS</strong> log:sasiotra/tryottrm(): SELECT was processed with FastExport.To turn on <strong>SAS</strong> tracing, run this statement:options sastrace=’,,,d’ sastraceloc=saslog;Threaded Reads with Partitioning WHERE ClausesIf FastExport is unavailable, threaded reads use partitioning WHERE clauses. Youcan create your own partitioning WHERE clauses using the DBSLICE= option.Otherwise, <strong>SAS</strong>/<strong>ACCESS</strong> to Teradata attempts to generate them on your behalf. Likeother <strong>SAS</strong>/<strong>ACCESS</strong> interfaces, this partitioning is based on the MOD function. Togenerate partitioning WHERE clauses, <strong>SAS</strong>/<strong>ACCESS</strong> to Teradata must locate a tablecolumn suitable <strong>for</strong> applying MOD. These types are eligible:3 BYTEINT3 SMALLINT3 INTEGER3 DATE3 DECIMAL (integral DECIMAL columns only)A DECIMAL column is eligible only if the column definition restricts it to integervalues. In other words, the DECIMAL column must be defined with a scale of zero.If the table you are reading contains more than one column of the above mentionedtypes, <strong>SAS</strong>/<strong>ACCESS</strong> to Teradata applies some nominal intelligence to select a bestchoice. Top priority is given to the primary index, if it is MOD-eligible. Otherwise,preference is given to any column that is defined as NOT NULL. Since this is anunsophisticated set of selection rules, you might want to supply your own partitioningusing the DBSLICE= option.To view your table’s column definitions, use the Teradata SHOW TABLE statement.Note: Partitioning WHERE clauses, either automatically generated or created byusing DBSLICE=, are not supported on z/OS.Whether automatically generated orcreated by using DBSLICE=, partitioning WHERE clauses is not supported on z/OS andUNIX. 4FastExport Versus Partitioning WHERE ClausesPartitioning WHERE clauses are innately less efficient than FastExport. TheTeradata DBMS must process separate SQL statements that vary in the WHERE

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

Saved successfully!

Ooh no, something went wrong!