Performance Considerations

While you can generally treat view descriptors like other SAS data sets in SAS programs, here are a few things that you should keep in mind:
  • It is sometimes better to extract ADABAS data and place it in a SAS data file rather than to read it directly. Here are some circumstances when you should probably extract:
    • If you plan to use the same ADABAS data in several procedures during the same SAS session, you might improve performance by extracting the ADABAS data. Placing this data in a SAS data file requires a certain amount of disk space to store the data and I/O to write the data. However, SAS data files are organized to provide optimal performance with PROC and DATA steps. Programs using SAS data files often use less CPU time than programs that directly read ADABAS data.
    • If you plan to read large amounts of ADABAS data and the data is being shared by several users, your direct reading of the data could adversely affect all users' response time.
    • If you are the creator of an ADABAS file and think that directly reading this data would present a security risk, you might want to extract the data and not distribute information about either the access descriptor or view descriptor.
  • If you intend to use the data in a particular sorted order several times, it is usually best to run the SORT procedure on the view descriptor, using the OUT= option. This is more efficient than requesting the same sort repeatedly (with a BY clause) on the ADABAS data. Note that you cannot run the SORT procedure on a view descriptor unless you use the SORT procedure's OUT= option.
  • Sorting data can be resource-intensive, whether it is done with the SORT procedure, with a BY statement (which generates a BY clause), or with a SORT clause stored in the view descriptor. You should sort data only when it is needed for your program.
  • If you reference a view descriptor in SAS code and the code includes a BY statement for a variable or variables (up to three) that corresponds to a descriptor data field in the ADABAS file, the interface view engine is called, and it will support the BY clause if possible. Thus, the BY clause sorts the ADABAS data before it uses the data in your SAS program. If the ADABAS file is very large, this sorting can affect performance.
    If the view descriptor already has a SORT clause and you specify a BY statement in your SAS code, the BY statement overrides the view descriptor's SORT clause.
  • When writing a SAS program and referencing a view descriptor, it is more efficient to use a SAS WHERE statement in the program than it is to use a subsetting IF statement. The SAS program passes the WHERE statement as a WHERE clause to the interface view engine, which adds it (using the Boolean operator AND) to any WHERE clause stored in the view descriptor. The view descriptor is then passed to ADABAS for processing. Applying a WHERE clause to the ADABAS data might reduce the number of logical records read. Therefore, it often improves performance.
  • See Creating and Using ADABAS View Descriptors Efficiently for more details about creating efficient view descriptors.