|SAS/ACCESS Interface to CA-DATACOM/DB: Reference
creating or using view descriptors, follow these guidelines
to minimize the use of CA-DATACOM/DB and
your operating system resources and to reduce the time CA-DATACOM/DB takes
to access data.
- Select only the fields your program needs. Selecting
unnecessary fields adds extra processing time.
- Specify the order in which records are presented
to the SAS System (with a SORT clause or a SAS BY statement) only if the SAS
System needs the data in a particular order for subsequent processing.
The SAS BY statement issues an ordering clause to
that CA-DATACOM/DB does the sorting
using its system resources. This SORT clause overrides any existing SORT
clause for the view descriptor. If you decide to use a SORT clause or a SAS
BY statement, order by a key, which is indexed, when possible. (For help
in determining which fields in a table are indexed, see your DBA or the table's
As an alternative to using a SORT clause, which consumes
CPU time each time you access the CA-DATACOM/DB table,
you could use the SORT procedure with the OUT= option to create a sorted SAS
data file. This is a better approach for data you want to use many times.
- If a view descriptor describes a large
and you will use the view descriptor often, it may be more efficient to extract
the data and place them in a SAS data file. (Even though the extracted data
file will be very large, you will need to create it only once. Also, the
extracted data will not reflect any subsequent updates to the table.) See Performance Considerations
for more information on when it is best to extract data.
- Specify selection criteria to retrieve a subset
of the records CA-DATACOM/DB software
returns to the SAS System, where possible.
- If you use a Default Key, the interface view engine
will use an index read instead of a sort if it can. Index reads are faster,
but not always possible. For example, an index read is not possible if you
specify multiple sort keys, multiple WHERE clause conditions, or a WHERE clause
condition with a column that is not a key.
- Omit the KEY statement if you do not need a certain
order and you want to retrieve the data sequentially. Otherwise, you may cause
an unnecessary sort. PROC FSBROWSE, FSEDIT, and FSVIEW automatically use random
access and require a value in the Default Key field.
- You can provide your own URT that is fine-tuned
for your applications.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.