SAS Scalable Performance Data Server
 

FOCUS AREAS

SPDE Engine - Tips and Tricks

Using PROC REG with the SPDE Engine

Creating Indexes in Parallel with the SPDE Engine

Using PROC REG with the SPDE Engine

The following example issues a libname statement using the SPDE Engine. The primary path of c:\spde\mainpath is specified as the location of the metadata. The DATAPATH and INDEXPATH options are used to specify the location of the partition data files and indexes respectively. PROC REG, one of the v9 threaded procedures, is then executed using the surveyData partitioned data set. (This example assumes that the surveyData data set was partitioned prior to this job running.) Because the data itself as well as the associated indexes and metadata are partitioned across multiple locations, PROC REG is able to input and process the data in parallel to speed up access to the data and therefore reduce execution time.

libname spdelib spde 'c:\spde\mainpath'
    datapath=('e:\spde\datapath1' 'f:\spde\datapath2')
    indexpath=('g:\spde\idxpath');

ods html body="body.htm";

title 'PROC REG against SPDE data set';
proc reg data=spdelib.surveyData;
   model  y=x1-x50/selection=stepwise details=summary;
quit;

ods html close;

Creating Indexes in Parallel with the SPDE Engine

The following example assumes that the Customer data set has already been created using the SPDE Engine, but that the indexes for three of its variables have not yet been created. The primary path of /PRIM01 is specified as the location of the metadata. The DATAPATH and INDEXPATH options are used to specify the location of the partition data files and indexes respectively. The SPDE-specific ASYNCINDEX data set option is used to cause the indexes to be created in parallel.

libname maindata spde '/PRIM01'
   datapath=('/DATA01' '/DATA02' '/DATA03')
   indexpath=('/INDX01' '/INDX02');
proc datasets lib=maindata;
   modify customer(asyncindex=yes);
      index create CustomerId LastName CustStatus;
quit;