Using Indexes

Overview

An index can help you quickly locate one or more observations that you want to read. Indexes provide direct access to observations in SAS data sets based on values of one or more key variables. Index applications include the following:
  • yield faster access to small subsets of observations for WHERE processing
  • perform table lookup operations
  • join observations
Without an index, SAS accesses observations sequentially, in the order in which they are stored in a data set. For example, to access the observation in the sample SAS data set shown below that has a value of Smith for the variable Name, SAS begins with the first observation and reads through each one until it reaches the observation that satisfies ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.