An index is an optional
SAS file that you can create for a SAS data file in order to provide
direct access to specific observations. The index file consists of
entries that are organized into hierarchical levels, such as a tree
structure, and connected by pointers. When an index is used to process
a request, such as for WHERE processing, SAS does a binary search
on the index file and positions the index to the first entry that
contains a qualified value. SAS uses the value's identifier to directly
access the observation that contains the value. SAS requires memory
for buffers when an index is actually used. The buffers are not required
unless SAS uses the index, but they must be allocated in preparation
for the index that is being used.
SAS automatically allocates
a minimal number of buffers in order to navigate the index file. Typically,
you do not need to specify extra buffers. However, using IBUFNO= to
specify extra buffers could improve execution time by limiting the
number of input/output operations that are required for a particular
index file. However, the improvement in execution time comes at the
expense of increased memory consumption.
Note: Whereas too few buffers allocated
to the index file decrease performance, over allocation of index buffers
creates performance problems as well. Experimentation is the best
way to determine the optimal number of index buffers. For example,
experiment with
ibufno=3
, then
ibufno=4
, and so on, until you find the least number
of buffers that produces satisfactory performance results.