Introduction

SAS provides a variety of techniques for querying data that enable you to create the results that you want in different ways. In this lesson, you learn to select the most efficient query techniques from those listed below, based on comparisons of resource usage.


Task Techniques
selecting a subset
  • WHERE statement that references a data set that has been indexed
creating a detail report
  • PRINT procedure
  • SQL procedure
creating a summary report for one class variable or a combination of class variables
  • MEANS procedure (or SUMMARY procedure)
  • TABULATE procedure
  • REPORT procedure
  • SQL procedure
  • DATA step


Note This lesson does not cover the Scalable Performance Data Engine (SPD Engine), which is a SAS 9.1 technology for threaded processing. For details about using the SPD Engine to improve performance, see the SAS documentation.

Notice: This lesson does not include guided practices. Also, the data sets that are used in examples throughout this lesson are not included in the sample data for this course. Therefore, the programs in this lesson will not run in your SAS session.


1.5 hours



In this lesson, you learn to

  • identify the costs and benefits of using an index
  • identify the factors that affect whether SAS uses an index for WHERE processing
  • determine whether SAS is likely to use an index to process a particular WHERE expression
  • identify the main features of compound optimization
  • identify the effect of indexing and order of data on WHERE processing
  • print centile information for a data file
  • identify the relative efficiency of the PRINT procedure and the SQL procedure for creating detail reports
  • identify the relative efficiency of five tools for summarizing data for one categorical variable
  • identify the relative efficiency of three ways of using the MEANS procedure to summarize data for selected combinations of categorical variables.

complete the following lessons:

  • .


  • .


  • .