Chapter Contents

Previous

Next
DBINDEX=

DBINDEX=



Indicates whether SAS queries the DBMS to find indexes on the specified table.

Default value: DBMS specific
See Also: DBKEY=


Syntax
Details

Syntax

DBINDEX=YES | NO | <'>index-name<'>

YES
queries the DBMS to find all of the table's indexes and attempts to use indexes on a DBMS table to improve performance.

NO
does not attempt to use indexes on a DBMS table.

index-name
uses the specified index name to improve performance.


Details

If you specify DBINDEX=YES in SAS applications, such as PROC SQL and the DATA step, SAS attempts to use indexes on a DBMS table to improve performance.

If you specify DBINDEX=NO, SAS makes no attempt to use indexes on a DBMS table.

If you specify DBINDEX=index-name, the specified index name is used by SAS applications to improve performance. The index name must exist and must be correct for the given context.

When you use the DBINDEX= option with the DATA step KEY= option, you must provide the index name as the value for the KEY= option.

In this example, setting DBINDEX=YES allows the DBMS to use the DBMS index, if one is associated with one or more columns in the MYDBLIB.EMPLOYEES table. If the EMPID column has an index on it, this query could perform significantly better if DBINDEX=YES is specified.

libname mydblib oracle user=karin pw=haggis schema=hrdept;

data keyvalues;
  input empid;
  datalines;
1247
4444
3675
...;
run; 

proc sql;
select * from keyvalues a, 
  mydblib.employees b (dbindex=yes)
  where a.empid=b.empid;
quit;
   

See your DBMS chapter for DBMS-specific details.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.