You
can create indexes on your SPD Engine data in parallel, asynchronously.
To enable asynchronous parallel index creation, use the
ASYNCINDEX= Data Set Option.
Use this option with
the DATA step INDEX= option, with PROC DATASETS INDEX CREATE commands,
or in the PROC APPEND statement when creating an SPD Engine data set
from a default Base SAS engine data set that has an index. Each
method enables all of the declared indexes to be populated from a
single scan of the data set.
The following example
shows indexes created in parallel using the DATA step. A simple index
is created on variable X and a composite index is created on variables
A and B.
data foo.mine(index=(x y=(a b)) asyncindex=yes);
x=1;
a="Doe";
b=20;
run;
To create multiple indexes
in parallel, you must allocate enough utility disk space to create
all of the key sorts at the same time. You must also allocate enough
memory space. Use the
SPDEUTILLOC= System Option to allocate disk space and
SPDEINDEXSORTSIZE= System Option in the configuration file or at invocation
to allocate additional memory.
The DATASETS procedure
has the flexibility to enable batched parallel index creation by using
multiple MODIFY groups. Instead of creating all of the indexes at
once, which would require a significant amount of space, you can create
the indexes in groups as shown in the following example:
proc datasets lib=main;
modify patients(asyncindex=yes);
index create number;
index create class;
run;
modify patients(asyncindex=yes)'
index create lastname firstname;
run;
modify patients(asyncindex=yes);
index create fullname=(lastname firstname);
index create class_sex=(class sex);
run;
quit;
Indexes NUMBER and CLASS are created in parallel,
indexes LASTNAME and FIRSTNAME are created in parallel, and indexes
FULLNAME and CLASS_SEX are created in parallel.
Note: You cannot create an index
or composite index on a variable if the variable name contains any
of the following special characters:
" * | \ : / < > ? -