10.3. Sorting and Performance

Sorting data in the SQL procedure, as in other parts of the SAS System, is a CPU and memory-intensive operation. When sufficient amounts of CPU and memory resources are available, the process is usually successful. But if either of these resources is in short supply or simply not available, the sort step is doomed for failure. The first order of business for SAS users is to minimize the number of sorts in their programs. By keeping a few simple guidelines in mind, problems can be minimized.

CPU-related bottlenecks can occur if sorts are performed on disk as opposed to in memory. Because most disks are slower than physical memory, this presents an important performance issue. The most logical and efficient place ...

Get PROC SQL: Beyond the Basics Using SAS® 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.