Detects and verifies that indexes exist on a DBMS table. If they do exist and are of the correct type, a join query that is passed to the DBMS might improve performance.
Valid in: | DATA and PROC steps |
Default: | DBMS specific |
Supports: | All |
no automated index search is performed.
verifies the index name that is specified for the index columns on the DBMS table. This requires the same type of call as when DBINDEX=YES is used.
data s1; a=1; y='aaaaa'; output; a=2; y='bbbbb'; output; a=5; y='ccccc'; output; run;
libname mydblib fedsvr server="d1234.us.company.com" port=2171 user=user1 pwd=pass1 dsn=oradsn dsnuser=orauser dsnpwd=orapwd dbindex=yes; proc sql; select * from s1 aa, x.dbtab bb where aa.a=bb.a; select * from s1 aa, mydblib.dbtab bb where aa.a=bb.a;
a
was
not found, the join would take place in SAS.
data a; set s1; set x.dbtab(dbindex=yes) key=a; set mydblib.dbtab(dbindex=yes) key=a; run;The key is validated against the list from the DBMS. If
a
is an index, then a pass down
occurs. Otherwise, the join takes place in SAS.
proc sql; select * from s1 aa, x.dbtab(dbindex=yes) bb where aa.a=bb.a; select * from s1 aa, mylib.dbtab(dbindex=yes) bb where aa.a=bb.a; /*or*/ select * from s1 aa, x.dbtab(dbindex=a) bb where aa.a=bb.a; select * from s1 aa, mylib.dbtab(dbindex=a) bb where aa.a=bb.a;