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 search on the
index file in order to rapidly locate the requested records.
Typically, you do not
need to specify an index page size. However, the following situations
could require a different page size:
-
The page size affects the number
of levels in the index. The more pages there are, the more levels
in the index. The more levels, the longer the index search takes.
Increasing the page size allows more index values to be stored on
each page, thus reducing the number of pages (and the number of levels).
The number of pages required for the index varies with the page size,
the length of the index value, and the values themselves. The main
resource that is saved when reducing levels in the index is I/O. If
your application is experiencing a lot of I/O in the index file, increasing
the page size might help. However, you must re-create the index file
after increasing the page size.
-
The index file structure requires
a minimum of three index values to be stored on a page. If the length
of an index value is very large, you might get an error message that
the index could not be created because the page size is too small
to hold three index values. Increasing the page size should eliminate
the error.
Note: Experimentation is the best
way to determine the optimal index page size.