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.

50 Using the DBINDEX=, DBKEY=, and MULTI_DATASRC_OPT= Options 4 Chapter 5reason. If you per<strong>for</strong>m a join and use PROC SQL, you must ensure that the columnsthat are specified through the DBKEY= option match the columns that are specified inthe <strong>SAS</strong> data set.CAUTION:Be<strong>for</strong>e you use the DBINDEX= option, take extreme care to evaluate some characteristicsof the DBMS data. The number of rows in the table, the number of rows returned inthe query, and the distribution of the index values in the table are among the factorsto take into consideration. Some experimentation might be necessary to discover theoptimum settings. 4You can use the DBINDEX= option instead of the DBKEY= option if you know thatthe DBMS table has one or more indexes that use the column(s) on which the join isbeing per<strong>for</strong>med. Use DBINDEX=index-name if you know the name of the index, or useDBINDEX=YES if you do not know the name of the index. Use this option as a data setoption, and not a LIBNAME option, because index lookup can potentially be anexpensive operation.DBINDEX= requires that the join table must have a database index that is definedon the columns involved in the join. If there is no index, then all processing of the jointakes place in <strong>SAS</strong>, where all rows from each table are read into <strong>SAS</strong> and <strong>SAS</strong> per<strong>for</strong>msthe join.Note: The data set options NULLCHAR= and NULLCHARVAL= determine how <strong>SAS</strong>missing character values are handled during DBINDEX= and DBKEY= processing. 4

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

Saved successfully!

Ooh no, something went wrong!