SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference |
Follow
these guidelines to minimize the use of
SYSTEM 2000 software and system resources and to reduce the time SYSTEM 2000
software takes to access data.
- Select only the items your program needs. Selecting
unnecessary items adds extra processing time.
- Use an ordering-clause or a SAS BY statement to
specify the order in which logical entries are presented to the SAS System
only if the SAS System needs the data in a particular order for subsequent
processing. (The SAS BY statement issues an ordering-clause to SYSTEM 2000
software and overrides any existing ordering-clause for the view descriptor.)
If you decide to use an ordering-clause or a SAS BY statement, order by an
indexed item when possible.
As an alternative to using an ordering-clause, which
consumes CPU time each time you access the SYSTEM 2000 database, 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 SYSTEM
2000 database 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. (Of course, the extracted
data file will be very large but only created once. Also, the extracted data
will not reflect any subsequent updates to the database.)
- When possible, specify selection criteria to subset
the number of logical entries SYSTEM 2000 software returns to the SAS System.
- Write selection criteria that allow SYSTEM 2000
software to use available indexes when possible. This applies whether you
specify the selection criteria as part of the view descriptor or use a SAS
WHERE clause.
This is especially important when accessing large databases.
When SYSTEM 2000 software cannot use an index, it sequentially scans the entire
database.
You cannot guarantee that SYSTEM 2000 software will
use an index to process a condition on a key item, but you can write selection
criteria that allow SYSTEM 2000 software to use available indexes effectively.
See SYSTEM 2000 QUEST Language and System Commands for a complete
set of where-clause optimization guidelines.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.