BeOptimized - Tips and Tricks

Create and use indexes in SAS

Indexes are special reference tables that the SAS engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. In this tips and tricks we will discuss how you can create and use SAS indexes.

Details

Queries created couple of years ago could be more slow today just because the size of the tables queried increased, those tables could require an index?
Before jumping in the detail of the SAS Indexes, an overview of it's way of working will be described:

  • Where are stored the indexes and what do they contains?
  • Once created, are they used by default?
  • What are the different kind of indexes?
We will then see how we can create them using Proc SQL or Data step or Proc Datasets:
  • Create simple index
  • Create composite index
  • Create unique index

  • Finally, we will see different options allowing you to see if the indexes are used and to force to use them.

    Prerequisites

    You have some SAS experience and would like to create and use indexes in order to speed up your queries on big data.


Go back to your selection


This site uses cookies. .

By continuing to browse the site you are agreeing to our use of cookies. Review our cookies information for more details.