NOINDEX= Table Option

Specifies whether to use the table's indexes when processing WHERE clauses. NOINDEX= can also be used to disable index use for BY order determination.

Valid in: SPD Server
Default: NO
Restriction: NOINDEX= affects index usage for BY ordering only if index usage for BY sorts is enabled on the server. The server parameter that enables BY sorts, BYINDEX, is maintained by the server administrator. Ask your administrator if BYINDEX is set for your site.

Syntax

NOINDEX=YES | NO

Required Arguments

YES

ignores indexes when processing WHERE clauses.

NO

uses indexes when processing WHERE clauses.

Details

Set NOINDEX= to YES to test the effect of indexes on performance or for specific processing. Do not use YES routinely for normal processing.

Example

You created an index for the Type column in table TempData.AudiCars but decide to test whether it is necessary for your processing. You issue a SELECT statement on the table that sets NOINDEX=YES and SELECT statement that sets NOINDEX=NO so that you can compare processing. You also set the SPDSWDEB macro variable.
libname tempdata sasspds "conversion_area" server=husky.5105
    user="siteusr1" password="userpwd";

proc sql;
create table tempdata.audicars as
select * from sashelp.cars
where make="Audi";
create index type on tempdata.audicars(type);
quit;

/*Turn on the macro variable SPDSWDEB */
/* to show whether the index is used */
/* during the table processing. */

%let spdswdeb=YES;

proc sql;
    select * from tempdata.audicars(noindex=yes) 
where type="Sedan";
    select * from tempdata.audicars(noindex=no) 
where type="Sedan";
quit;
The following output is written to the SAS log:
89   %let spdswdeb=YES;
90
91   proc sql;
92       select * from tempdata.audicars(noindex=yes) where type="Sedan";

whinit: WHERE (Type='Sedan')
whinit: wh-tree presented
           /-NAME = [Type]
 --CEQ----|
           \-LITC = ['Sedan']
whinit returns: ALL EVAL2

93       select * from tempdata.audicars(noindex=no) where type="Sedan";

whinit: WHERE (Type='Sedan')
whinit: wh-tree presented
           /-NAME = [Type]
 --CEQ----|
           \-LITC = ['Sedan']
whinit: wh-tree after split
 -- <empty>
whinit: INDEX Type uses 100% of segs (WITHIN maxsegratio 100%) 
whinit: INDEX tree after split
            /-NAME = [Type] <1>INDEX Type (Type)  
--CEQ----|
            \-LITC = ['Sedan'] 
whinit costing: 1 segs with est 1% yield reduces whthreads from 32 to 1 
whinit returns: ALL EVAL1(w/SEGLIST)
The whinit returns message shows ALL EVAL1 when the index is used, and ALL EVAL2 when a sequential pass is used.

See Also

SPD Server macro variables:
Last updated: February 8, 2017