Previous Page | Next Page

SPD Engine LIBNAME Statement Options

IDXBY= LIBNAME Statement Option



Specifies whether to use indexes when processing BY statements in the SPD Engine.
Corresponding data set option: IDXBY=
Affected by data set option: BYSORT=
Default: YES

Syntax
Details
Examples
Example 1: Using the IDXBY=NO LIBNAME Option
Example 2: Using the IDXBY=YES LIBNAME Option

Syntax

IDXBY=YES | NO

YES

uses an index when processing indexed variables in a BY statement.

Note:   If the BY statement specifies more than one variable or the DESCENDING option, then the index is not used, even if IDXBY=YES.   [cautionend]

NO

does not use an index when processing indexed variables in a BY statement.

Note:   IDXBY=NO performs an automatic sort when processing a BY statement.  [cautionend]


Details

When you use the IDXBY= LIBNAME option, make sure that you use BYSORT=YES option and that the BY variable is indexed.

In some cases, you might get better performance from the SPD Engine if you automatically sort the data. To use the automatic sort, BYSORT=YES must be set and you should specify IDXBY=NO.

Set the SAS system option MSGLEVEL=I so that the BY processing information is written to the SAS log. When you use the IDXBY= LIBNAME option and the BYSORT=YES option, the following messages are written to the SAS log:


Examples


Example 1: Using the IDXBY=NO LIBNAME Option

libname permdata spde 'c:/sales' idxby=no;
options msglevel=i;
	proc means data=permdata.customer;
   	var sales;
   by state;
	run;

The following message is written to the SAS log:

NOTE: BY ordering was produced by performing an automatic sort 
      on table PERMDATA.customer.
NOTE: There were 100 observations read from the data 
      set PERMDATA.CUSTOMER.


Example 2: Using the IDXBY=YES LIBNAME Option

The following example uses IDXBY=YES:

libname permdata spde 'c:\sales' idxby=yes;
options msglevel=i;
	proc means data=permdata.customer;
    var sales;
    by state;
run;

The following message is written to the SAS log:

NOTE: BY ordering was produced by using an index for table 
      PERMDATA.customer.
NOTE: There were 2981 observations read from the data set 
      PERMDATA.CUSTOMER.

Previous Page | Next Page | Top of Page