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.

41CHAPTER5Optimizing Your SQL UsageOverview of Optimizing Your SQL Usage 41Passing Functions to the DBMS Using PROC SQL 42Passing Joins to the DBMS 43Passing the DELETE Statement to Empty a Table 45When Passing Joins to the DBMS Will Fail 45Passing DISTINCT and UNION Processing to the DBMS 46Optimizing the Passing of WHERE Clauses to the DBMS 47General Guidelines <strong>for</strong> WHERE Clauses 47Passing Functions to the DBMS Using WHERE Clauses 47Using the DBINDEX=, DBKEY=, and MULTI_DATASRC_OPT= Options 48Overview of Optimizing Your SQL Usage<strong>SAS</strong>/<strong>ACCESS</strong> takes advantage of DBMS capabilities by passing certain SQLoperations to the DBMS whenever possible. This can reduce data movement, which canimprove per<strong>for</strong>mance. The per<strong>for</strong>mance impact can be significant when you access largeDBMS tables and the SQL that is passed to the DBMS subsets the table to reduce theamount of rows. <strong>SAS</strong>/<strong>ACCESS</strong> sends operations to the DBMS <strong>for</strong> processing in thefollowing situations:3 When you use the SQL pass-through facility, you submit DBMS-specific SQLstatements that are sent directly to the DBMS <strong>for</strong> execution. For example, whenyou submit Transact-SQL statements to be passed to a Sybase database.3 When <strong>SAS</strong>/<strong>ACCESS</strong> can translate the operations into the SQL of the DBMS.When you use the <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement and PROC SQL, yousubmit <strong>SAS</strong> statements that <strong>SAS</strong>/<strong>ACCESS</strong> can often translate into the SQL of theDBMS and then pass to the DBMS <strong>for</strong> processing.By using the automatic translation abilities, you can often achieve the per<strong>for</strong>mancebenefits of the SQL pass-through facility without needing to write DBMS-specific SQLcode. The following sections describe the <strong>SAS</strong> SQL operations that <strong>SAS</strong>/<strong>ACCESS</strong> canpass to the DBMS <strong>for</strong> processing. See “Optimizing the Passing of WHERE Clauses tothe DBMS” on page 47 <strong>for</strong> in<strong>for</strong>mation about passing WHERE clauses to the DBMS.

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

Saved successfully!

Ooh no, something went wrong!